<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_for_launchpad(old_vendor, name, urls):
 """Check if the project is hosted on launchpad. :param name: str, name of the project :param urls: set, urls to check. :return: the name of the project on launchpad, or an empty string. """

    if old_vendor != "pypi":
        # XXX This might work for other starting vendors
        # XXX but I didn't check. For now only allow
        # XXX pypi -> launchpad.
        return ''

    for url in urls:
        try:
            return re.match(r"https?://launchpad.net/([\w.\-]+)",
                            url).groups()[0]
        except AttributeError:
            continue
    return ''