code: def cvsplit_dtrajs(dtrajs):
      
      if len(dtrajs) == 1:
          raise ValueError('Only have a single trajectory. Cannot be split into train and test set')
      I0 = np.random.choice(len(dtrajs), int(len(dtrajs)/2), replace=False)
      I1 = np.array(list(set(list(np.arange(len(dtrajs)))) - set(list(I0))))
      dtrajs_train = [dtrajs[i] for i in I0]
      dtrajs_test = [dtrajs[i] for i in I1]
      return dtrajs_train, dtrajs_test
docs: Splits the trajectories into a training and test set with approximately equal number of trajectories
  
      Parameters
      ----------
      dtrajs : list of ndarray(int)
          Discrete trajectories