class_docstr: Do not use this class explicitly.
  
  Instead you should construct its objects with special functions:
  `geocode()`, `geocode_cities()`, `geocode_counties()`, `geocode_states()`,
  `geocode_countries()`, `reverse_geocode()`.
class_docstr_tok: ["Do","not","use","this","class","explicitly",".","Instead","you","should","construct","its","objects","with","special","functions",":","`","geocode","(",")","`",",","`","geocode_cities","(",")","`",",","`","geocode_counties","(",")","`",",","`","geocode_states","(",")","`",",","`","geocode_countries","(",")","`",",","`","reverse_geocode","(",")","`","."]
docstr: Initialize self.
docstr_tok: ["Initialize","self","."]
code: def __init__(
      self,
      level: Optional[Union[str, LevelKind]] = None,
      request: request_types = None,
  ):
      """Initialize self."""
  
      Geocoder.__init__(self)
  
      self._geocodes: Optional[Geocodes] = None
      self._scope: List[Optional[MapRegion]] = []
      self._level: Optional[LevelKind] = _to_level_kind(level)
      self._default_ambiguity_resolver: AmbiguityResolver = (
          AmbiguityResolver.empty()
      )  # TODO rename to geohint
      self._highlights: bool = False
      self._allow_ambiguous = False
      self._countries: List[Optional[MapRegion]] = []
      self._states: List[Optional[MapRegion]] = []
      self._counties: List[Optional[MapRegion]] = []
      self._overridings: Dict[
          QuerySpec, WhereSpec
      ] = {}  # query to scope
  
      requests: Optional[List[str]] = _ensure_is_list(request)
      if requests is not None:
          self._names: List[Optional[str]] = list(
              map(
                  lambda name: name if requests is not None else None,
                  requests,
              )
          )
      else:
          self._names = []
  
imports: from collections import namedtuple
  from collections.abc import Iterable
  from typing import Union, List, Optional, Dict
  from pandas import Series
  from .geocodes import _to_level_kind, request_types, Geocodes, _raise_exception, _ensure_is_list
  from .gis.geocoding_service import GeocodingService
  from .gis.geometry import GeoRect, GeoPoint
  from .gis.request import RequestBuilder, GeocodingRequest, RequestKind, MapRegion, AmbiguityResolver, RegionQuery, LevelKind, IgnoringStrategyKind, PayloadKind, ReverseGeocodingRequest
  from .gis.response import Response, SuccessResponse
  from .type_assertion import assert_list_type
label_desc: Use image node_id 1 to create a new NamesGeocoder object from inherited base classes: Geocoder with example: obj = NamesGeocoder(level, request)