'Convert coordinates to another representation.
If the instance is of the requested class, it is returned unmodified.
By default, conversion is done via cartesian coordinates.
Parameters
other_class : `~astropy.coordinates.BaseRepresentation` subclass
The type of representation to turn the coordinates into.
differential_class : dict of `~astropy.coordinates.BaseDifferential`, optional
Classes in which the differentials should be represented.
Can be a single class if only a single differential is attached,
otherwise it should be a `dict` keyed by the same keys as the
differentials.'

def represent_as(self, other_class, differential_class=None):

    if ((other_class is self.__class__) and (not differential_class)):
        return self.without_differentials()
    else:
        if isinstance(other_class, six.string_types):
            raise ValueError(u"Input    to    a    representation's    represent_as    must    be    a    class,    not    a    string.    For    strings,    use    frame    objects")
        new_rep = other_class.from_cartesian(self.to_cartesian())
        new_rep._differentials = self._re_represent_differentials(new_rep, differential_class)
        return new_rep
