def _get_pr_status(pr, cache):
    """
    Retrieves the ``github.CommitStatus.CommitStatus`` object that
    describes the status of the pull request.

    :param pr: The ``github.PullRequest.PullRequest`` object to audit.
    :param cache: A dictionary used for caching temporary values, so
                  that they may be reused by subsequent audit checks.

    :returns: The applicable ``github.CommitStatus.CommitStatus``
              object, or ``None`` if not available.
    """
    if 'status' not in cache:
        last_commit = list(pr.get_commits())[-1]
        statuses = list(last_commit.get_statuses())
        cache['status'] = statuses[0] if statuses else None
    return cache['status']
