code: def deserialize_skycoord(d):
      
      if 'distance' in d:
          args = (d['lon'], d['lat'], d['distance'])
      else:
          args = (d['lon'], d['lat'])
  
      return coords.SkyCoord(
          *args,
          frame=d['frame'],
          representation='spherical')
docs: Deserializes a JSONified :obj:`astropy.coordinates.SkyCoord`.
  
      Args:
          d (:obj:`dict`): A dictionary representation of a :obj:`SkyCoord` object.
  
      Returns:
          A :obj:`SkyCoord` object.