code: def generate_py_upgrades(data):
      """Generate the list of upgrades in upgrades.py."""
      print(" upgrades.py ".center(60, "-"))
      print("class Upgrades(enum.IntEnum):")
      print(
          '  """The list of upgrades, as returned from RequestData."""'
      )
      for upgrade in sorted(data.upgrades, key=lambda a: a.name):
          if (
              upgrade.name
              and upgrade.upgrade_id in static_data.UPGRADES
          ):
              print("  %s = %s" % (upgrade.name, upgrade.upgrade_id))
      print("\n")
  
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 4 for calling a global function with example usage: generate_py_upgrades(data) without return types