def METHOD_NAME(commits, commit):
    _commits = [value for key, value in commits.items()
                if key.startswith(commit)]
    if len(_commits) == 1:
        return _commits[0]
    return commit