code: def get_unit_type(unit_id):
      for race in (Neutral, Protoss, Terran, Zerg):
          try:
              return race(unit_id)
          except ValueError:
              pass
  
file_path: pysc2/pysc2/lib/units.py
imports: import enum
label_desc: Use image node_id 1 for calling a global function with example usage: get_unit_type(unit_id) and returns: race