<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_cartopy(self):
 """Convert to a CartoPy projection."""

        globe = self.cartopy_globe
        proj_name = self._attrs['grid_mapping_name']
        try:
            proj_handler = self.projection_registry[proj_name]
        except KeyError:
            raise ValueError('Unhandled projection: {}'.format(proj_name))

        return proj_handler(self._attrs, globe)