def get_branch_by_rev(self, rev: str, allow_multiple: bool=False) -> str:
    'Returns full refname for the experiment branch containing rev.'
    ref_infos = list(exp_refs_by_rev(self.scm, rev))
    if (not ref_infos):
        return None
    if ((len(ref_infos) > 1) and (not allow_multiple)):
        raise MultipleBranchError(rev)
    return str(ref_infos[0])
Returns full refname for the experiment branch containing rev.
def get_branch_by_rev(self, rev: str, allow_multiple: bool=False) -> str:
    
    ref_infos = list(exp_refs_by_rev(self.scm, rev))
    if (not ref_infos):
        return None
    if ((len(ref_infos) > 1) and (not allow_multiple)):
        raise MultipleBranchError(rev)
    return str(ref_infos[0])