code: def socket():
      """
      Train agent on experience collected in parallel from 2 CartPole environments running on
      another machine.
  
      Typical use case: same as mode 2, but generally remote communication socket > process
  
      Simulate remote environment, usually run on another machine via:
          python run.py --environment gym --level CartPole-v1 --remote socket-server --port 65432
      """
      agent = "benchmarks/configs/ppo.json"
      environment = "benchmarks/configs/cartpole.json"
  
      def server(port):
          Environment.create(
              environment=environment, remote="socket-server", port=port
          )
  
      server1 = Thread(target=server, kwargs=dict(port=65432))
      server2 = Thread(target=server, kwargs=dict(port=65433))
      server1.start()
      server2.start()
  
      runner = Runner(
          agent=agent,
          num_parallel=2,
          remote="socket-client",
          host="127.0.0.1",
          port=65432,
      )
      runner.run(num_episodes=100)  # optional: batch_agent_calls=True
      runner.close()
  
      server1.join()
      server2.join()
  
imports: from threading import Thread
  from tensorforce import Environment, Runner
label_desc: Use image node_id 5 for calling a global function with example usage: socket() without return types