<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_travis_branch():
 """Get the name of the branch that the PR is from. Note that this is not simply ``$TRAVIS_BRANCH``. the ``push`` build will use the correct branch (the branch that the PR is from) but the ``pr`` build will use the _target_ of the PR (usually master). So instead, we ask for ``$TRAVIS_PULL_REQUEST_BRANCH`` if it's a PR build, and ``$TRAVIS_BRANCH`` if it's a push build. """

    if os.environ.get("TRAVIS_PULL_REQUEST", "") == "true":
        return os.environ.get("TRAVIS_PULL_REQUEST_BRANCH", "")
    else:
        return os.environ.get("TRAVIS_BRANCH", "")