code: def cartopy_globe(self):
          
          if 'earth_radius' in self._attrs:
              kwargs = {'ellipse': 'sphere', 'semimajor_axis': self._attrs['earth_radius'],
                        'semiminor_axis': self._attrs['earth_radius']}
          else:
              attr_mapping = [('semimajor_axis', 'semi_major_axis'),
                              ('semiminor_axis', 'semi_minor_axis'),
                              ('inverse_flattening', 'inverse_flattening')]
              kwargs = self._map_arg_names(self._attrs, attr_mapping)
  
              # WGS84 with semi_major==semi_minor is NOT the same as spherical Earth
              # Also need to handle the case where we're not given any spheroid
              kwargs['ellipse'] = None if kwargs else 'sphere'
  
          return ccrs.Globe(**kwargs)
docs: Initialize a `cartopy.crs.Globe` from the metadata.