def METHOD_NAME(
    state: "State",
    host: "Host",
    command,
    get_pty: bool = False,  # ignored
    timeout=None,
    stdin=None,
    success_exit_codes=None,
    print_output: bool = False,
    print_input: bool = False,
    return_combined_output: bool = False,
    **command_kwargs,
):
    """
    Execute a command on the local machine.
    Args:
        state (``pyinfra.api.State`` object): state object for this command
        host (``pyinfra.api.Host`` object): the target host
        command (string): actual command to execute
        sudo (boolean): whether to wrap the command with sudo
        sudo_user (string): user to sudo to
        env (dict): environment variables to set
        timeout (int): timeout for this command to complete before erroring
    Returns:
        tuple: (exit_code, stdout, stderr)
        stdout and stderr are both lists of strings from each buffer.
    """
    def execute_command():
        unix_command = make_unix_command_for_host(state, host, command, **command_kwargs)
        actual_command = unix_command.get_raw_value()
        logger.debug("--> Running command on localhost: %s", unix_command)
        if print_input:
            click.echo("{0}>>> {1}".format(host.print_prefix, unix_command), err=True)
        return run_local_process(
            actual_command,
            stdin=stdin,
            timeout=timeout,
            print_output=print_output,
            print_prefix=host.print_prefix,
        )
    return_code, combined_output = execute_command_with_sudo_retry(
        host,
        command_kwargs,
        execute_command,
    )
    if success_exit_codes:
        status = return_code in success_exit_codes
    else:
        status = return_code == 0
    if return_combined_output:
        return status, combined_output
    stdout, stderr = split_combined_output(combined_output)
    return status, stdout, stderr