code: def split_into_trajectories(
      observations,
      actions,
      rewards,
      masks,
      dones_float,
      next_observations,
  ):
      trajs = [[]]
      for i in tqdm(range(len(observations))):
          trajs[-1].append(
              (
                  observations[i],
                  actions[i],
                  rewards[i],
                  masks[i],
                  dones_float[i],
                  next_observations[i],
              )
          )
          if dones_float[i] == 1.0 and i + 1 < len(observations):
              trajs.append([])
      return trajs
  
file_path: PARL/benchmark/torch/iql/replay_buffer.py
imports: import numpy
  from parl.utils import logger
  import d4rl
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: split_into_trajectories(observations, actions, rewards, masks, dones_float, next_observations) and returns: trajs