def METHOD_NAME(self, project, by="key"):
    """
    Check if project exist.
    :param project: string: The requested project.
    :param by: string (default is "key"): How to interpret project, can be 'key' or 'name'.
    :return: True if the project exists
    """
    METHOD_NAME = False
    try:
        self.get(project, by)
        METHOD_NAME = True
    except HTTPError as e:
        if e.response.status_code in (401, 404):
            pass
    except Exception as e:
        if not str(e) == "Unknown project {} '{}'".format(by, project):
            raise e
    return METHOD_NAME