code: def udp_server(addr):
      family = socket.AF_INET6 if ":" in addr.ip else socket.AF_INET
      sock = socket.socket(
          family, socket.SOCK_DGRAM, socket.IPPROTO_UDP
      )
      sock.bind(addr)
      return sock
  
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 a global function with example usage: udp_server(addr) and returns: sock