def package_in_pypi(package):
url = '<STR_LIT>' % package<EOL>try:<EOL><INDENT>urllib.request.urlopen(url)<EOL>return True<EOL><DEDENT>except urllib.error.HTTPError as e:<EOL><INDENT>logger.debug("<STR_LIT>", e)<EOL>return False<EOL><DEDENT>
Check whether the package is registered on pypi