class_docstr: A Starcraft II environment for playing vs humans over LAN.
  
  This owns a single instance, and expects to join a game hosted by some other
  script, likely play_vs_agent.py.
docstr: Make sure this stays synced with bin/play_vs_agent.py.
code: def _launch_remote(
      self,
      host,
      config_port,
      race,
      name,
      interface,
      agent_interface_format,
  ):
      """Make sure this stays synced with bin/play_vs_agent.py."""
      self._tcp_conn, settings = tcp_client(Addr(host, config_port))
  
      self._map_name = settings["map_name"]
  
      if settings["remote"]:
          self._udp_sock = udp_server(
              Addr(host, settings["ports"]["server"]["game"])
          )
  
          daemon_thread(
              tcp_to_udp,
              (
                  self._tcp_conn,
                  self._udp_sock,
                  Addr(host, settings["ports"]["client"]["game"]),
              ),
          )
  
          daemon_thread(udp_to_tcp, (self._udp_sock, self._tcp_conn))
  
      extra_ports = [
          settings["ports"]["server"]["game"],
          settings["ports"]["server"]["base"],
          settings["ports"]["client"]["game"],
          settings["ports"]["client"]["base"],
      ]
  
      self._run_config = run_configs.get(
          version=settings["game_version"]
      )
      self._sc2_procs = [
          self._run_config.start(
              extra_ports=extra_ports,
              host=host,
              window_loc=(700, 50),
              want_rgb=interface.HasField("render"),
          )
      ]
      self._controllers = [p.controller for p in self._sc2_procs]
  
      # Create the join request.
      join = sc_pb.RequestJoinGame(options=interface)
      join.race = race
      join.player_name = name
      join.shared_port = 0  # unused
      join.server_ports.game_port = settings["ports"]["server"]["game"]
      join.server_ports.base_port = settings["ports"]["server"]["base"]
      join.client_ports.add(
          game_port=settings["ports"]["client"]["game"],
          base_port=settings["ports"]["client"]["base"],
      )
  
      self._controllers[0].save_map(
          settings["map_path"], settings["map_data"]
      )
      self._controllers[0].join_game(join)
  
      self._game_info = [self._controllers[0].game_info()]
      self._features = [
          features.features_from_game_info(
              game_info=self._game_info[0],
              agent_interface_format=agent_interface_format,
          )
      ]
  
imports: import binascii
  import collections
  import hashlib
  import json
  import os
  import shutil
  import socket
  import struct
  import subprocess
  import threading
  import time
  from absl import logging
  from pysc2 import run_configs
  from pysc2.env import sc2_env
  from pysc2.lib import features
  from pysc2.lib import run_parallel
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 2 for calling the LanSC2Env obj's underlying member method code with example usage: obj._launch_remote(host, config_port, race, name, interface, agent_interface_format) without return types