# Path: srsly/tests/ruamel_yaml/roundtrip.py
# def dedent(data):
#     try:
#         position_of_first_newline = data.index("\n")
#         for idx in range(position_of_first_newline):
#             if not data[idx].isspace():
#                 raise ValueError
#     except ValueError:
#         pass
#     else:
#         data = data[position_of_first_newline + 1 :]
#     return textwrap.dedent(data)


import re
import pytest  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
from .roundtrip import dedent
# coding: utf-8




# from PyYAML docs
class Dice(tuple):
    def __new__(cls, a, b):
        return tuple.__new__(cls, [a, b])

    def __repr__(self):
        return "Dice(%s,%s)" % self


def dice_constructor(loader, node):
    value = loader.construct_scalar(node)

# Path: srsly/tests/ruamel_yaml/roundtrip.py
# def dedent(data):
#     try:
#         position_of_first_newline = data.index("\n")
#         for idx in range(position_of_first_newline):
#             if not data[idx].isspace():
#                 raise ValueError
#     except ValueError:
#         pass
#     else:
#         data = data[position_of_first_newline + 1 :]
#     return textwrap.dedent(data)


# Path: srsly/tests/ruamel_yaml/test_add_xxx.py
import re
import pytest  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
    import srsly.ruamel_yaml  # NOQA
from .roundtrip import dedent

# coding: utf-8




# from PyYAML docs
class Dice(tuple):
    def __new__(cls, a, b):
        return tuple.__new__(cls, [a, b])

    def __repr__(self):
        return "Dice(%s,%s)" % self


def dice_constructor(loader, node):
    value = loader.construct_scalar(node)

    a, b = map(int, value.split("d"))