# Path: srsly/ruamel_yaml/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
# class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#         def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):
# 
# Path: srsly/ruamel_yaml/nodes.py
# class MappingNode(CollectionNode):
#     __slots__ = ('merge',)
#     id = 'mapping'
# 
#     def __init__(
#         self,
#         tag,
#         value,
#         start_mark=None,
#         end_mark=None,
#         flow_style=None,
#         comment=None,
#         anchor=None,
#     ):
#         # type: (Any, Any, Any, Any, Any, Any, Any) -> None
#         CollectionNode.__init__(
#             self, tag, value, start_mark, end_mark, flow_style, comment, anchor
#         )
#         self.merge = None
# 
# class ScalarNode(Node):
#     """
#     styles:
#       ? -> set() ? key, no value
#       " -> double quoted
#       ' -> single quoted
#       | -> literal style
#       > -> folding style
#     """
# 
#     __slots__ = ('style',)
#     id = 'scalar'
# 
#     def __init__(
#         self, tag, value, start_mark=None, end_mark=None, style=None, comment=None, anchor=None
#     ):
#         # type: (Any, Any, Any, Any, Any, Any, Any) -> None
#         Node.__init__(self, tag, value, start_mark, end_mark, comment=comment, anchor=anchor)
#         self.style = style
# 
# class SequenceNode(CollectionNode):
#     __slots__ = ()
#     id = 'sequence'
# 
# Path: srsly/ruamel_yaml/util.py
# class LazyEval(object):
#     def __init__(self, func, *args, **kwargs):
#         def lazy_self():
#     def __getattribute__(self, name):
#     def __setattr__(self, name, value):
# def load_yaml_guess_indent(stream, **kw):
#     def leading_spaces(l):
# def configobj_walker(cfg):
# def _walk_section(s, level=0):


import re
    from typing import Any, Dict, List, Union, Text, Optional  # NOQA
    from .compat import VersionType  # NOQA
from .compat import string_types, _DEFAULT_YAML_VERSION  # NOQA
from .error import *  # NOQA
from .nodes import MappingNode, ScalarNode, SequenceNode  # NOQA
from .util import RegExp  # NOQA
        # `ScalarNode`, `SequenceNode`, `MappingNode` or `None`.  `None`
        # matches any kind of a node.  `index_check` could be `None`, a boolean
        # value, a string value, or a number.  `None` and `False` match against
        # any _value_ of sequence and mapping nodes.  `True` matches against
        # any _key_ of a mapping node.  A string `index_check` matches against
        # a mapping value that corresponds to a scalar key which content is
        # equal to the `index_check` value.  An integer `index_check` matches
        # against a sequence value with the index equal to `index_check`.
        if "yaml_path_resolvers" not in cls.__dict__:
            cls.yaml_path_resolvers = cls.yaml_path_resolvers.copy()
        new_path = []  # type: List[Any]
        for element in path:
            if isinstance(element, (list, tuple)):
                if len(element) == 2:
                    node_check, index_check = element
                elif len(element) == 1:
                    node_check = element[0]
                    index_check = True
                else:
                    raise ResolverError("Invalid path element: %s" % (element,))
            else:
                node_check = None
                index_check = element
            if node_check is str:
                node_check = ScalarNode
            elif node_check is list:
                node_check = SequenceNode
            elif node_check is dict:
                node_check = MappingNode
            elif (

# Path: srsly/ruamel_yaml/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
# class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#         def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):
# 
# Path: srsly/ruamel_yaml/nodes.py
# class MappingNode(CollectionNode):
#     __slots__ = ('merge',)
#     id = 'mapping'
# 
#     def __init__(
#         self,
#         tag,
#         value,
#         start_mark=None,
#         end_mark=None,
#         flow_style=None,
#         comment=None,
#         anchor=None,
#     ):
#         # type: (Any, Any, Any, Any, Any, Any, Any) -> None
#         CollectionNode.__init__(
#             self, tag, value, start_mark, end_mark, flow_style, comment, anchor
#         )
#         self.merge = None
# 
# class ScalarNode(Node):
#     """
#     styles:
#       ? -> set() ? key, no value
#       " -> double quoted
#       ' -> single quoted
#       | -> literal style
#       > -> folding style
#     """
# 
#     __slots__ = ('style',)
#     id = 'scalar'
# 
#     def __init__(
#         self, tag, value, start_mark=None, end_mark=None, style=None, comment=None, anchor=None
#     ):
#         # type: (Any, Any, Any, Any, Any, Any, Any) -> None
#         Node.__init__(self, tag, value, start_mark, end_mark, comment=comment, anchor=anchor)
#         self.style = style
# 
# class SequenceNode(CollectionNode):
#     __slots__ = ()
#     id = 'sequence'
# 
# Path: srsly/ruamel_yaml/util.py
# class LazyEval(object):
#     def __init__(self, func, *args, **kwargs):
#         def lazy_self():
#     def __getattribute__(self, name):
#     def __setattr__(self, name, value):
# def load_yaml_guess_indent(stream, **kw):
#     def leading_spaces(l):
# def configobj_walker(cfg):
# def _walk_section(s, level=0):


# Path: srsly/ruamel_yaml/resolver.py
import re
    from typing import Any, Dict, List, Union, Text, Optional  # NOQA
    from .compat import VersionType  # NOQA
from .compat import string_types, _DEFAULT_YAML_VERSION  # NOQA
from .error import *  # NOQA
from .nodes import MappingNode, ScalarNode, SequenceNode  # NOQA
from .util import RegExp  # NOQA

        # `ScalarNode`, `SequenceNode`, `MappingNode` or `None`.  `None`
        # matches any kind of a node.  `index_check` could be `None`, a boolean
        # value, a string value, or a number.  `None` and `False` match against
        # any _value_ of sequence and mapping nodes.  `True` matches against
        # any _key_ of a mapping node.  A string `index_check` matches against
        # a mapping value that corresponds to a scalar key which content is
        # equal to the `index_check` value.  An integer `index_check` matches
        # against a sequence value with the index equal to `index_check`.
        if "yaml_path_resolvers" not in cls.__dict__:
            cls.yaml_path_resolvers = cls.yaml_path_resolvers.copy()
        new_path = []  # type: List[Any]
        for element in path:
            if isinstance(element, (list, tuple)):
                if len(element) == 2:
                    node_check, index_check = element
                elif len(element) == 1:
                    node_check = element[0]
                    index_check = True
                else:
                    raise ResolverError("Invalid path element: %s" % (element,))
            else:
                node_check = None
                index_check = element
            if node_check is str:
                node_check = ScalarNode
            elif node_check is list:
                node_check = SequenceNode
            elif node_check is dict:
                node_check = MappingNode
            elif (

                node_check not in [ScalarNode, SequenceNode, MappingNode]