'Given a name, query the CDS name resolver to attempt to retrieve
coordinate information for that object. The search database, sesame
url, and  query timeout can be set through configuration items in
``astropy.coordinates.name_resolve`` -- see docstring for
`~astropy.coordinates.get_icrs_coordinates` for more
information.
Parameters
name : str
The name of the object to get coordinates for, e.g. ``\'M42\'``.
frame : str or `BaseCoordinateFrame` class or instance
The frame to transform the object to.
Returns
coord : SkyCoord
Instance of the SkyCoord class.'

@classmethod
def from_name(cls, name, frame=u'icrs'):

    from .name_resolve import get_icrs_coordinates
    icrs_coord = get_icrs_coordinates(name)
    icrs_sky_coord = cls(icrs_coord)
    if (frame in (u'icrs', icrs_coord.__class__)):
        return icrs_sky_coord
    else:
        return icrs_sky_coord.transform_to(frame)
