code: def avg_point(unit_type, obs):
      unit_layer = obs.feature_screen.unit_type
      y, x = (unit_layer == unit_type).nonzero()
      if not y.any():
          return None, None
      return [int(x.mean()), int(y.mean())]
  
imports: from absl.testing import absltest
  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 renderer_ascii
  from pysc2.lib import units
  from pysc2.tests import utils
  from s2clientprotocol import common_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: avg_point(unit_type, obs) and returns: list, None,  None