code: def create_constants_module(
      constant_definitions: list[headerparser.ConstantDefinition],
      extension: bool = False,
  ) -> None:
      lines = [
          PREAMBLE % "Constants for OpenGL ES 2.0.",
          DEFINE_ENUM,
          "",
      ]
  
      # For extensions, we only take the OES ones, and remove the OES
      if extension:
          renamed_defs = []
          for c in constant_definitions:
              if "OES" in c.oname:
                  c.oname = c.oname.replace("OES", "")
                  c.oname = c.oname.replace("__", "_").strip("_")
                  renamed_defs.append(c)
          constant_definitions = renamed_defs
  
      # Insert constants
      for c in sorted(constant_definitions, key=lambda x: x.oname):
          if isinstance(c.value, int):
              lines.append(
                  "%s = Enum(%r, %r)" % (c.oname, c.oname, c.value)
              )
          else:
              lines.append("%s = %r" % (c.oname, c.value))
      lines.append("")
  
      lines.append(DEFINE_CONST_MAP)
  
      # Write the file
      fname = "_constants_ext.py" if extension else "_constants.py"
      with open(os.path.join(GLDIR, fname), "wb") as f:
          f.write(("\n".join(lines)).encode("utf-8"))
      print("wrote %s" % fname)
  
imports: from __future__ import annotations
  import os
  import sys
  import headerparser
  from annotations import parse_anotations
  from OpenGL import GL
label_desc: Use image node_id 2 for calling a global function with example usage: create_constants_module(constant_definitions, extension) without return types