class_docstr: Writes a single pyi file
class_docstr_tok: ["Writes","a","single","pyi","file"]
code: def write_methods(
      self,
      service: d.ServiceDescriptorProto,
      class_name: str,
      is_abstract: bool,
      scl_prefix: SourceCodeLocation,
  ) -> None:
      wl = self._write_line
      wl(
          "DESCRIPTOR: {}",
          self._import(
              "google.protobuf.descriptor", "ServiceDescriptor"
          ),
      )
      methods = [
          (i, m)
          for i, m in enumerate(service.method)
          if m.name not in PYTHON_RESERVED
      ]
      if not methods:
          wl("...")
      for i, method in methods:
          if is_abstract:
              wl("@{}", self._import("abc", "abstractmethod"))
          wl(f"def {method.name}(")
          with self._indent():
              wl(f"inst: {class_name},")
              wl(
                  "rpc_controller: {},",
                  self._import(
                      "google.protobuf.service", "RpcController"
                  ),
              )
              wl(
                  "request: {},",
                  self._import_message(method.input_type),
              )
              wl(
                  "callback: {}[[{}], None] | None{},",
                  self._import("collections.abc", "Callable"),
                  self._import_message(method.output_type),
                  "" if is_abstract else " = ...",
              )
  
          scl_method = scl_prefix + [
              d.ServiceDescriptorProto.METHOD_FIELD_NUMBER,
              i,
          ]
          wl(
              ") -> {}[{}]:{}",
              self._import("concurrent.futures", "Future"),
              self._import_message(method.output_type),
              " ..." if not self._has_comments(scl_method) else "",
          )
          if self._has_comments(scl_method):
              with self._indent():
                  if not self._write_comments(scl_method):
                      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 16 for calling the PkgWriter obj's underlying member method code with example usage: obj.write_methods(service, class_name, is_abstract, scl_prefix) without return types