class_docstr: Writes a single pyi file
class_docstr_tok: ["Writes","a","single","pyi","file"]
code: def _map_key_value_types(
      self,
      map_field: d.FieldDescriptorProto,
      key_field: d.FieldDescriptorProto,
      value_field: d.FieldDescriptorProto,
  ) -> Tuple[str, str]:
      oldstyle_keytype = map_field.options.Extensions[
          extensions_pb2.keytype
      ]
      if oldstyle_keytype:
          print(
              f"Warning: Map Field {map_field.name}: (mypy_protobuf.keytype) is deprecated. Prefer (mypy_protobuf.options).keytype",
              file=sys.stderr,
          )
      key_casttype = (
          map_field.options.Extensions[extensions_pb2.options].keytype
          or oldstyle_keytype
      )
      ktype = (
          self._import_casttype(key_casttype)
          if key_casttype
          else self.python_type(key_field)
      )
  
      oldstyle_valuetype = map_field.options.Extensions[
          extensions_pb2.valuetype
      ]
      if oldstyle_valuetype:
          print(
              f"Warning: Map Field {map_field.name}: (mypy_protobuf.valuetype) is deprecated. Prefer (mypy_protobuf.options).valuetype",
              file=sys.stderr,
          )
      value_casttype = (
          map_field.options.Extensions[extensions_pb2.options].valuetype
          or map_field.options.Extensions[extensions_pb2.valuetype]
      )
      vtype = (
          self._import_casttype(value_casttype)
          if value_casttype
          else self.python_type(value_field)
      )
  
      return ktype, vtype
  
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 19 for calling the PkgWriter obj's underlying member method code with example usage: obj._map_key_value_types(map_field, key_field, value_field) and returns: ktype,  vtype