code: def checkout_branch(self, branch):
          
  
          _, stdout, stderr = self.git_exec(
              ['checkout', branch],
              with_extended_output=True)
          return '\n'.join([stderr, stdout])
docs: Checks out given branch.