def branches(self, user, repo, branch=None):
        if branch:
            return [self.repo(user, repo).branch(branch)]
        return self.repo(user, repo).iter_branches() or []

    # TODO: Test
List a repo's branches or get a single branch (in a list).
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/github/api.py/GitHubClient.branches