# Path: srsly/ruamel_yaml/error.py
# class YAMLError(Exception):
#     pass
# 
# class FileMark(StreamMark):
#     __slots__ = ()
# 
# class StringMark(StreamMark):
#     __slots__ = "name", "index", "line", "column", "buffer", "pointer"
# 
#     def __init__(self, name, index, line, column, buffer, pointer):
#         # type: (Any, int, int, int, Any, Any) -> None
#         StreamMark.__init__(self, name, index, line, column)
#         self.buffer = buffer
#         self.pointer = pointer
# 
#     def get_snippet(self, indent=4, max_length=75):
#         # type: (int, int) -> Any
#         if self.buffer is None:  # always False
#             return None
#         head = ""
#         start = self.pointer
#         while start > 0 and self.buffer[start - 1] not in u"\0\r\n\x85\u2028\u2029":
#             start -= 1
#             if self.pointer - start > max_length / 2 - 1:
#                 head = " ... "
#                 start += 5
#                 break
#         tail = ""
#         end = self.pointer
#         while (
#             end < len(self.buffer) and self.buffer[end] not in u"\0\r\n\x85\u2028\u2029"
#         ):
#             end += 1
#             if end - self.pointer > max_length / 2 - 1:
#                 tail = " ... "
#                 end -= 5
#                 break
#         snippet = utf8(self.buffer[start:end])
#         caret = "^"
#         caret = "^ (line: {})".format(self.line + 1)
#         return (
#             " " * indent
#             + head
#             + snippet
#             + tail
#             + "\n"
#             + " " * (indent + self.pointer - start + len(head))
#             + caret
#         )
# 
#     def __str__(self):
#         # type: () -> Any
#         snippet = self.get_snippet()
#         where = '  in "%s", line %d, column %d' % (
#             self.name,
#             self.line + 1,
#             self.column + 1,
#         )
#         if snippet is not None:
#             where += ":\n" + snippet
#         return where
# 
# class YAMLStreamError(Exception):
#     pass
# 
# 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/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 codecs
from .error import YAMLError, FileMark, StringMark, YAMLStreamError
from .compat import text_type, binary_type, PY3, UNICODE_SIZE
from .util import RegExp
    from typing import Any, Dict, Optional, List, Union, Text, Tuple, Optional  # NOQA
        self.name = None  # type: Any
        self.stream_pointer = 0
        self.eof = True
        self.buffer = ""
        self.pointer = 0
        self.raw_buffer = None  # type: Any
        self.raw_decode = None
        self.encoding = None  # type: Optional[Text]
        self.index = 0
        self.line = 0
        self.column = 0

    @property
    def stream(self):
        # type: () -> Any
        try:
            return self._stream
        except AttributeError:
            raise YAMLStreamError("input stream needs to specified")

    @stream.setter
    def stream(self, val):
        # type: (Any) -> None
        if val is None:
            return
        self._stream = None
        if isinstance(val, text_type):
            self.name = "<unicode string>"
            self.check_printable(val)
            self.buffer = val + u"\0"  # type: ignore

# Path: srsly/ruamel_yaml/error.py
# class YAMLError(Exception):
#     pass
# 
# class FileMark(StreamMark):
#     __slots__ = ()
# 
# class StringMark(StreamMark):
#     __slots__ = "name", "index", "line", "column", "buffer", "pointer"
# 
#     def __init__(self, name, index, line, column, buffer, pointer):
#         # type: (Any, int, int, int, Any, Any) -> None
#         StreamMark.__init__(self, name, index, line, column)
#         self.buffer = buffer
#         self.pointer = pointer
# 
#     def get_snippet(self, indent=4, max_length=75):
#         # type: (int, int) -> Any
#         if self.buffer is None:  # always False
#             return None
#         head = ""
#         start = self.pointer
#         while start > 0 and self.buffer[start - 1] not in u"\0\r\n\x85\u2028\u2029":
#             start -= 1
#             if self.pointer - start > max_length / 2 - 1:
#                 head = " ... "
#                 start += 5
#                 break
#         tail = ""
#         end = self.pointer
#         while (
#             end < len(self.buffer) and self.buffer[end] not in u"\0\r\n\x85\u2028\u2029"
#         ):
#             end += 1
#             if end - self.pointer > max_length / 2 - 1:
#                 tail = " ... "
#                 end -= 5
#                 break
#         snippet = utf8(self.buffer[start:end])
#         caret = "^"
#         caret = "^ (line: {})".format(self.line + 1)
#         return (
#             " " * indent
#             + head
#             + snippet
#             + tail
#             + "\n"
#             + " " * (indent + self.pointer - start + len(head))
#             + caret
#         )
# 
#     def __str__(self):
#         # type: () -> Any
#         snippet = self.get_snippet()
#         where = '  in "%s", line %d, column %d' % (
#             self.name,
#             self.line + 1,
#             self.column + 1,
#         )
#         if snippet is not None:
#             where += ":\n" + snippet
#         return where
# 
# class YAMLStreamError(Exception):
#     pass
# 
# 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/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/reader.py
import codecs
from .error import YAMLError, FileMark, StringMark, YAMLStreamError
from .compat import text_type, binary_type, PY3, UNICODE_SIZE
from .util import RegExp
    from typing import Any, Dict, Optional, List, Union, Text, Tuple, Optional  # NOQA

        self.name = None  # type: Any
        self.stream_pointer = 0
        self.eof = True
        self.buffer = ""
        self.pointer = 0
        self.raw_buffer = None  # type: Any
        self.raw_decode = None
        self.encoding = None  # type: Optional[Text]
        self.index = 0
        self.line = 0
        self.column = 0

    @property
    def stream(self):
        # type: () -> Any
        try:
            return self._stream
        except AttributeError:
            raise YAMLStreamError("input stream needs to specified")

    @stream.setter
    def stream(self, val):
        # type: (Any) -> None
        if val is None:
            return
        self._stream = None
        if isinstance(val, text_type):
            self.name = "<unicode string>"
            self.check_printable(val)
            self.buffer = val + u"\0"  # type: ignore

        elif isinstance(val, binary_type):