<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def semaphore(branch: str):
 """ Performs necessary checks to ensure that the semaphore build is successful, on the correct branch and not a pull-request. :param branch: The branch the environment should be running against. """

    assert os.environ.get('BRANCH_NAME') == branch
    assert os.environ.get('PULL_REQUEST_NUMBER') is None
    assert os.environ.get('SEMAPHORE_THREAD_RESULT') != 'failed'