def _pull_requests_from_spec(gh, spec):
    logging.info("Parsing spec %s", spec)
    if ':' in spec:
        repo_name, pr_id = spec.split(':')
        repo = gh.get_repo(repo_name)
        user_or_org = _user_or_org(gh, repo_name.split('/')[0])
        logging.info("Spec is for pr #%s in repo %s",
                     pr_id,
                     repo_name)
        yield user_or_org, repo, repo.get_pull(int(pr_id))
    elif spec in '/':
        repo = gh.get_repo(spec)
        user_or_org = _user_or_org(gh, spec.split('/')[0])
        logging.info("Spec is for all prs in repo %s",
                     repo.url)
        for pull_request in _pull_requests_from_repo(repo):
            yield user_or_org, repo, pull_request
    else:
        user_or_org = _user_or_org(gh, spec)
        logging.info("Spec is for all prs in all repos for user/org %s",
                     spec)
        for repo in user_or_org.get_repos():
            for pull_request in _pull_requests_from_repo(repo):
                yield user_or_org, repo, pull_request
dataset/ETHPy150Open hut8labs/diffscuss/diffscuss/github_import.py/_pull_requests_from_spec/swapped operands of `in`