code: def set_branch(self, commit, branch_name):
          
          res = proto.SetBranchRequest(commit=commit_from(commit), branch=branch_name)
          self.stub.SetBranch(res, metadata=self.metadata)
docs: Sets a commit and its ancestors as a branch.
  
          Params:
          * commit: A tuple, string, or Commit object representing the commit.
          * branch_name: The name for the branch to set.