code: def get_units(
      obs, filter_fn=None, owner=None, unit_type=None, tag=None
  ):
      """Return a dict of units that match the filter."""
      if unit_type and not isinstance(unit_type, (list, tuple)):
          unit_type = (unit_type,)
      return {
          u.tag: u
          for u in obs.observation.raw_data.units  # pylint: disable=g-complex-comprehension
          if (
              (filter_fn is None or filter_fn(u))
              and (owner is None or u.owner == owner)
              and (unit_type is None or u.unit_type in unit_type)
              and (tag is None or u.tag == tag)
          )
      }
  
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 1 for calling a global function with example usage: get_units(obs, filter_fn, owner, unit_type, tag) and returns: unknown