code: def permute(num):
      "Permutation for randomizing data order."
      if permute_data:
          return np.random.permutation(num)
      else:
          logging.warning("Warning not permuting data")
          return np.arange(numf permute(num):
      "Permutation for randomizing data order."
      if permute_data:
          return np.random.permutation(num)
      else:
          logging.warning("Warning not permuting data")
          return np.arange(num)
docs: Permutation for randomizing data order.