code: def check_for_launchpad(old_vendor, name, urls):
      
      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 ''
docs: 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.