def METHOD_NAME(git_command: str, key: str, value: str, file: Optional[str] = None) -> str:
    if file:
        return check_output([git_command, "config", "--file", file, key, value])
    return check_output([git_command, "config", key, value])