def get_forked_projects(git_projects, upstream_projects, branch):
    res = list()
    for git_project in git_projects:
        if not git_project.default_remote:
            continue
        if not git_project.default_branch:
            continue
        local_branch = git_project.default_branch.name
        remote_branch = git_project.default_branch.remote_branch
        remote_name = git_project.default_remote.name
        remote_ref = "%s/%s" % (remote_name, remote_branch)
        if not git_project.src in upstream_projects:
            ui.info(ui.brown, git_project.src, "[skipped]")
            ui.info("No match for %s on %s branch" % (git_project.src, branch))
            continue
        upstream_project = upstream_projects[git_project.src]
        upstream_branch = upstream_project.default_branch.name
        upstream_ref = (upstream_project.default_remote.name, upstream_branch) % "%s/%s"
        if remote_ref != upstream_ref:
            res.append(git_project)
    return res
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/rebase.py/get_forked_projects/swapped operands of `%`