code: def worker(remote, env_fn):
      # Ignore CTRL+C in the worker process
      signal.signal(signal.SIGINT, signal.SIG_IGN)
      env = env_fn()
      try:
          while True:
              cmd, data = remote.recv()
              if cmd == "step":
                  ob, reward, done, info = env.step(data)
                  remote.send((ob, reward, done, info))
              elif cmd == "reset":
                  ob = env.reset()
                  remote.send(ob)
              elif cmd == "close":
                  remote.close()
                  break
              elif cmd == "get_spaces":
                  remote.send((env.action_space, env.observation_space))
              elif cmd == "spec":
                  remote.send(env.spec)
              elif cmd == "seed":
                  remote.send(env.seed(data))
              else:
                  raise NotImplementedError
      finally:
          env.close()
  
file_path: pfrl/pfrl/envs/multiprocess_vector_env.py
imports: import signal
  import warnings
  from multiprocessing import Pipe, Process
  import numpy
  from torch.distributions.utils import lazy_property
  import pfrl
label_desc: Use image node_id 1 for calling a global function with example usage: worker(remote, env_fn) without return types