def METHOD_NAME(
    call: str, flag: str, help_flags: List[str] = [],
    root: str = '', raise_on_error: bool = True
):
    """
    Checks if the given flag is present in the help output
    of the given command.
    :param str call: the command the check
    :param str flag: the flag or substring to find in stdout
    :param list help_flags: a list with the required command arguments.
    :param str root: root directory of the env to validate
    :param bool raise_on_error:
        raises KiwiCommandCapabilitiesError and message if the
        specified flag does not occur on stdout/stderr of the
        command call
    :return: True if the flag is found, False in any other case
    :rtype: bool
    """
    help_args = help_flags or ['--help']
    if root:
        arguments = ['chroot', root, call] + help_args
    else:
        arguments = [call] + help_args
    command = Command.run(arguments, raise_on_error=False)
    for line in command.output.splitlines():
        if flag in line:
            return True
    for line in command.error.splitlines():
        if flag in line:
            return True
    message = 'Could not parse {} output'.format(call)
    if raise_on_error:
        raise KiwiCommandCapabilitiesError(message)
    log.warning(message)
    return False