xrange is not defined in python3. Rename xrange() to range(). Change-Id: I6e2d934cee802fcd6fbca3d19c5d51a641fef018