code: def get_unit(*args, **kwargs):
      """Return the first unit that matches, or None."""
      try:
          return next(iter(get_units(*args, **kwargs).values()))
      except StopIteration:
          return None
  
imports: import random
  from absl import app
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.lib import actions
  from pysc2.lib import features
  from pysc2.lib import point
  from pysc2.lib import units
  from s2clientprotocol import common_pb2
  from s2clientprotocol import error_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: get_unit() and returns: next, None