def is_config_or_edit_end(line, configs):
    """
    Is the line indicates that 'config' or 'edit' section ends?

    - config <name>
        ...
      end

    - edit <name>
        ...
      next

    :param line: A str represents a line in configurations output
    :param configs: A stack (list) holding config node objects
    """
    if configs[-1].end_re.match(line):  # config/edit section ends.
        return True

    return False