class_docstr: Writes a single pyi file
class_docstr_tok: ["Writes","a","single","pyi","file"]
docstr: Imports a stdlib path and returns a handle to it
  eg. self._import("typing", "Literal") -> "Literal"
docstr_tok: ["Imports","a","stdlib","path","and","returns","a","handle","to","it","eg",".","self._import","(","``","typing","''",",","``","Literal","''",")","-",">","``","Literal","''"]
code: def _import(self, path: str, name: str) -> str:
      """Imports a stdlib path and returns a handle to it
      eg. self._import("typing", "Literal") -> "Literal"
      """
      if path == "typing_extensions":
          stabilization = {
              "Literal": (3, 8),
              "TypeAlias": (3, 10),
          }
          assert name in stabilization
          if (
              not self.typing_extensions_min
              or self.typing_extensions_min < stabilization[name]
          ):
              self.typing_extensions_min = stabilization[name]
          return "typing_extensions." + name
  
      imp = path.replace("/", ".")
      if self.readable_stubs:
          self.from_imports[imp].add((name, None))
          return name
      else:
          self.imports.add(imp)
          return imp + "." + name
  
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 2 for calling the PkgWriter obj's underlying member method code with example usage: obj._import(path, name) and returns: unknown, name, unknown