code: def _parse_resolution(resolution: str) -> Resolution:
      if isinstance(resolution, str):
          if resolution == "city":
              return Resolution.city_medium
  
          if resolution == "county":
              return Resolution.county_medium
  
          if resolution == "state":
              return Resolution.state_medium
  
          if resolution == "country":
              return Resolution.country_medium
  
          if resolution == "world":
              return Resolution.world_medium
  
          return Resolution[resolution]
  
      raise ValueError(
          "Invalid resolution type: " + type(resolution).__name__
      )
  
imports: import enum
  from abc import abstractmethod
  from collections.abc import Iterable
  from typing import List, Optional, Union, Dict
  from pandas import DataFrame, Series
  from lets_plot.geo_data_internals.constants import DF_COLUMN_HIGHLIGHTS, DF_COLUMN_COUNTRY, DF_COLUMN_STATE, DF_COLUMN_COUNTY, DF_COLUMN_CITY, DF_COLUMN_ID, DF_COLUMN_FOUND_NAME, DF_COLUMN_POSITION, DF_COLUMN_LIMIT, DF_COLUMN_CENTROID
  from .gis.geocoding_service import GeocodingService
  from .gis.request import PayloadKind, RequestBuilder, RequestKind, MapRegion, RegionQuery
  from .gis.response import Answer, GeocodedFeature, Namesake, AmbiguousFeature, LevelKind
  from .gis.response import SuccessResponse, Response, AmbiguousResponse, ErrorResponse
  from .type_assertion import assert_type, assert_list_type
label_desc: Use image node_id 5 for calling a global function with example usage: _parse_resolution(resolution) and returns: Resolution, Resolution, Resolution, Resolution, Resolution, Resolution