code: def generate_py_units(data):
      """Generate the list of units in units.py."""
      units = collections.defaultdict(list)
      for unit in sorted(data.units, key=lambda a: a.name):
          if unit.unit_id in static_data.UNIT_TYPES:
              units[unit.race].append(unit)
  
      def print_race(name, race):
          print("class %s(enum.IntEnum):" % name)
          print('  """%s units."""' % name)
          for unit in units[race]:
              print("  %s = %s" % (unit.name, unit.unit_id))
          print("\n")
  
      print(" units.py ".center(60, "-"))
      print_race("Neutral", sc_common.NoRace)
      print_race("Protoss", sc_common.Protoss)
      print_race("Terran", sc_common.Terran)
      print_race("Zerg", sc_common.Zerg)
  
file_path: pysc2/pysc2/bin/gen_data.py
imports: import collections
  from absl import app
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.lib import static_data
  from s2clientprotocol import common_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: generate_py_units(data) without return types