code: def test_parallel_data_load_from_directory_clipped(tmpdir):
      """Test loading trajectories of multiple episodes in parallel into an in-memory dataset. (Each
      data-loader process reads the files assigned to it.)"""
      os.chdir(tmpdir)
  
      # Heuristics rollout
      rollout_config = {
          "configuration": "test",
          "env": "gym_env",
          "env.name": "CartPole-v0",
          "policy": "random_policy",
          "runner": "sequential",
          "runner.n_episodes": 2,
          "runner.record_trajectory": True,
          "runner.max_episode_steps": 50,
          "seeding.env_base_seed": 12345,
          "seeding.agent_base_seed": 12345,
      }
      run_maze_job(
          rollout_config,
          config_module="maze.conf",
          config_name="conf_rollout",
      )
  
      dataset = InMemoryDataset(
          n_workers=2,
          conversion_env_factory=lambda: make_gym_maze_env(
              "CartPole-v0"
          ),
          input_data="trajectory_data",
          trajectory_processor=IdentityTrajectoryProcessor(),
          deserialize_in_main_thread=False,
      )
  
      dataset_clipped = InMemoryDataset(
          n_workers=2,
          conversion_env_factory=lambda: make_gym_maze_env(
              "CartPole-v0"
          ),
          input_data="trajectory_data",
          trajectory_processor=DeadEndClippingTrajectoryProcessor(
              clip_k=2
          ),
          deserialize_in_main_thread=False,
      )
  
      assert len(dataset) - 4 == len(dataset_clipped)
  
file_path: maze/maze/test/core/trajectory_recording/test_dead_end_clipping_trajectory_processor.py
imports: import os
  from maze.core.trajectory_recording.datasets.in_memory_dataset import InMemoryDataset
  from maze.core.trajectory_recording.datasets.trajectory_processor import DeadEndClippingTrajectoryProcessor, IdentityTrajectoryProcessor
  from maze.core.utils.factory import Factory
  from maze.core.wrappers.maze_gym_env_wrapper import make_gym_maze_env
  from maze.test.shared_test_utils.run_maze_utils import run_maze_job
label_desc: Use image node_id 3 for calling a global function with example usage: test_parallel_data_load_from_directory_clipped(tmpdir) without return types