class_docstr: An interface to the GSHHS dataset.
  
  See https://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html
  
  Parameters
  ----------
  scale
      The dataset scale. One of 'auto', 'coarse', 'low', 'intermediate',
      'high, or 'full' (default is 'auto').
  levels
      A list of integers 1-6 corresponding to the desired GSHHS feature
      levels to draw (default is [1] which corresponds to coastlines).
  
  Other Parameters
  ----------------
  **kwargs
      Keyword arguments to be used when drawing the feature. Defaults
      are edgecolor='black' and facecolor='none'.
docstr: Return the appropriate scale (e.g. 'i') for the given extent
  expressed in PlateCarree CRS.
docstr_tok: ["Return","the","appropriate","scale","(","e.g",".","'","i","'",")","for","the","given","extent","expressed","in","PlateCarree","CRS","."]
code: def _scale_from_extent(self, extent):
      """
      Return the appropriate scale (e.g. 'i') for the given extent
      expressed in PlateCarree CRS.
  
      """
      # Default to coarse scale
      scale = "c"
  
      if extent is not None:
          # Upper limit on extent in degrees.
          scale_limits = (
              ("c", 20.0),
              ("l", 10.0),
              ("i", 2.0),
              ("h", 0.5),
              ("f", 0.1),
          )
  
          width = abs(extent[1] - extent[0])
          height = abs(extent[3] - extent[2])
          min_extent = min(width, height)
          if min_extent != 0:
              for scale, limit in scale_limits:
                  if min_extent > limit:
                      break
  
      return scale
  
imports: from abc import ABCMeta, abstractmethod
  import numpy
  import shapely.geometry
  import cartopy.crs
  import cartopy.io.shapereader
label_desc: Use image node_id 2 for calling the GSHHSFeature obj's underlying member method code with example usage: obj._scale_from_extent(extent) and returns: scale