def _is_command(line: str) -> bool:
    """
    Return whether the given line is a command.

    Returns False for comments and empty lines.
    Empty lines behave similar to comments,
    for example continue a multi-line command.
    """
    stripped = line.strip()
    return bool(stripped) and not stripped.startswith("#")