def METHOD_NAME(*args):
    try:
        with open('/dev/null', 'w', encoding='utf-8') as devnull:
            return subprocess.check_output(
                ["git"] + list(args),
                cwd=ANSIBLE_DIR,
                stderr=devnull,
                universal_newlines=True,
            )
    except subprocess.CalledProcessError as e:
        if e.returncode == 128:
            # We are not in a git repo; most likely pip installed
            return None
        raise