class_docstr: Writes a single pyi file
class_docstr_tok: ["Writes","a","single","pyi","file"]
code: def write_enums(
      self,
      enums: Iterable[d.EnumDescriptorProto],
      prefix: str,
      scl_prefix: SourceCodeLocation,
  ) -> None:
      wl = self._write_line
      for i, enum in enumerate(enums):
          class_name = (
              enum.name
              if enum.name not in PYTHON_RESERVED
              else "_r_" + enum.name
          )
          value_type_fq = prefix + class_name + ".ValueType"
          enum_helper_class = "_" + enum.name
          value_type_helper_fq = (
              prefix + enum_helper_class + ".ValueType"
          )
          etw_helper_class = "_" + enum.name + "EnumTypeWrapper"
          scl = scl_prefix + [i]
  
          wl(f"class {enum_helper_class}:")
          with self._indent():
              wl(
                  'ValueType = {}("ValueType", {})',
                  self._import("typing", "NewType"),
                  self._builtin("int"),
              )
              # Alias to the classic shorter definition "V"
              wl(
                  "V: {} = ValueType",
                  self._import("typing_extensions", "TypeAlias"),
              )
          wl("")
          wl(
              "class {}({}[{}], {}):  # noqa: F821",
              etw_helper_class,
              self._import(
                  "google.protobuf.internal.enum_type_wrapper",
                  "_EnumTypeWrapper",
              ),
              value_type_helper_fq,
              self._builtin("type"),
          )
          with self._indent():
              ed = self._import(
                  "google.protobuf.descriptor", "EnumDescriptor"
              )
              wl(f"DESCRIPTOR: {ed}")
              self.write_enum_values(
                  [
                      (i, v)
                      for i, v in enumerate(enum.value)
                      if v.name not in PROTO_ENUM_RESERVED
                  ],
                  value_type_helper_fq,
                  scl + [d.EnumDescriptorProto.VALUE_FIELD_NUMBER],
              )
          wl("")
  
          if self._has_comments(scl):
              wl(
                  f"class {class_name}({enum_helper_class}, metaclass={etw_helper_class}):"
              )
              with self._indent():
                  self._write_comments(scl)
              wl("")
          else:
              wl(
                  f"class {class_name}({enum_helper_class}, metaclass={etw_helper_class}): ..."
              )
              if prefix == "":
                  wl("")
  
          self.write_enum_values(
              enumerate(enum.value),
              value_type_fq,
              scl + [d.EnumDescriptorProto.VALUE_FIELD_NUMBER],
          )
          if prefix == "" and not self.readable_stubs:
              wl(
                  f"{_mangle_global_identifier(class_name)} = {class_name}"
              )
          wl("")
  
imports: from __future__ import annotations
  import sys
  from collections import defaultdict
  from contextlib import contextmanager
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Sequence, Tuple
  import google.protobuf.descriptor_pb2
  from google.protobuf.compiler import plugin_pb2
  from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
  from google.protobuf.internal.well_known_types import WKTBASES
  from .None import extensions_pb2
label_desc: Use image node_id 12 for calling the PkgWriter obj's underlying member method code with example usage: obj.write_enums(enums, prefix, scl_prefix) without return types