import random


def _get_randomized_list(data):
  """Returns a randomized list."""
  randomized_data = list(data)
  nr_values = len(randomized_data)
  for i in range(nr_values):
    upper = nr_values - i
    # Randomly choosing an index between 0 and upper.
    index = random.randrange(upper)
    if index != upper - 1:
      # Swap index and the last element.
      tmp = randomized_data[index]
      randomized_data[index] = randomized_data[upper - 1]
      randomized_data[upper - 1] = tmp
  return randomized_data