def METHOD_NAME(directory, tag, annotated=False):
    env = environ.copy()
    env["GIT_DIR"] = pjoin(directory, ".git")
    chdir(directory)
    command = ["git", "tag"]
    if annotated:
        command.extend(["-a", "-m", "Some tag"])
    command.append(tag)
    check_output(command, env=env)