code: def _east_west_formatted(longitude, num_format="g"):
      hemisphere = _lon_hemisphere(longitude)
      return f"{abs(longitude):{num_format}}\N{Degree Sign}{hemisphere}"
  
imports: import itertools
  import operator
  import warnings
  import matplotlib
  import matplotlib.artist
  import matplotlib.collections
  import matplotlib.text
  import matplotlib.ticker
  import matplotlib.transforms
  import numpy
  import shapely.geometry
  import cartopy
  from cartopy.crs import PlateCarree, Projection, _RectangularProjection
  from cartopy.mpl.ticker import LatitudeFormatter, LatitudeLocator, LongitudeFormatter, LongitudeLocator
label_desc: Use image node_id 4 for calling a global function with example usage: _east_west_formatted(longitude, num_format) and returns: abs, str, hemisphere