class_docstr: Tick formatter for a longitude axis.
class_docstr_tok: ["Tick","formatter","for","a","longitude","axis","."]
code: def _hemisphere(self, value, value_source_crs):
      value = self._fix_lons(value)
      # Perform basic hemisphere detection.
      if value < 0:
          hemisphere = self._cardinal_labels.get("west", "W")
      elif value > 0:
          hemisphere = self._cardinal_labels.get("east", "E")
      else:
          hemisphere = ""
      # Correct for user preferences:
      if value == 0 and self._zero_direction_labels:
          # Use the original tick value to determine the hemisphere.
          if value_source_crs < 0:
              hemisphere = self._cardinal_labels.get("east", "E")
          else:
              hemisphere = self._cardinal_labels.get("west", "W")
      if value in (-180, 180) and not self._dateline_direction_labels:
          hemisphere = ""
      return hemisphere
  
imports: import matplotlib
  from matplotlib.ticker import Formatter, MaxNLocator
  import numpy
  import cartopy.crs
  from cartopy.mpl.geoaxes import GeoAxes
label_desc: Use image node_id 6 for calling the LongitudeFormatter obj's underlying member method code with example usage: obj._hemisphere(value, value_source_crs) and returns: hemisphere