code: def ensure_dtraj_list(dtrajs):
      r
      if isinstance(dtrajs, list):
          # elements are ints? then wrap into a list
          if is_list_of_int(dtrajs):
              return [np.array(dtrajs, dtype=int)]
          else:
              for i, dtraj in enumerate(dtrajs):
                  dtrajs[i] = ensure_dtraj(dtraj)
              return dtrajs
      else:
          return [ensure_dtraj(dtrajs)]
docs: r"""Makes sure that dtrajs is a list of discrete trajectories (array of int)