# 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)
# 
# def round_trip_load(inp, preserve_quotes=None, version=None):
#     import srsly.ruamel_yaml  # NOQA
# 
#     dinp = dedent(inp)
#     return srsly.ruamel_yaml.load(
#         dinp,
#         Loader=srsly.ruamel_yaml.RoundTripLoader,
#         preserve_quotes=preserve_quotes,
#         version=version,
#     )
# 
# def round_trip_dump(
#     data,
#     stream=None,
#     indent=None,
#     block_seq_indent=None,
#     top_level_colon_align=None,
#     prefix_colon=None,
#     explicit_start=None,
#     explicit_end=None,
#     version=None,
# ):
#     import srsly.ruamel_yaml  # NOQA
# 
#     return srsly.ruamel_yaml.round_trip_dump(
#         data,
#         stream=stream,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )


import copy
import pytest  # NOQA
from .roundtrip import dedent, round_trip_load, round_trip_dump
        data_copy["a"].fa.set_block_style()
        assert data["a"].fa.flow_style() == data_copy["a"].fa.flow_style()
        assert data["a"].fa._flow_style is False
        assert data_copy["a"].fa._flow_style is False
        y = round_trip_dump(data_copy)
        z = round_trip_dump(data)
        assert y == z

        assert y == dedent(
            """\
        a:
          foo: bar
          baz: quux
        """
        )

    def test_copy_flow_style_nested_list(self):
        x = dedent(
            """\
        a: [1, 2, 3]
        """
        )
        data = round_trip_load(x)
        assert data["a"].fa.flow_style() is True
        data_copy = copy.copy(data)
        assert data_copy["a"].fa.flow_style() is True
        data_copy["a"].fa.set_block_style()
        assert data["a"].fa.flow_style() == data_copy["a"].fa.flow_style()
        assert data["a"].fa._flow_style is False
        assert data_copy["a"].fa._flow_style is False

# 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)
# 
# def round_trip_load(inp, preserve_quotes=None, version=None):
#     import srsly.ruamel_yaml  # NOQA
# 
#     dinp = dedent(inp)
#     return srsly.ruamel_yaml.load(
#         dinp,
#         Loader=srsly.ruamel_yaml.RoundTripLoader,
#         preserve_quotes=preserve_quotes,
#         version=version,
#     )
# 
# def round_trip_dump(
#     data,
#     stream=None,
#     indent=None,
#     block_seq_indent=None,
#     top_level_colon_align=None,
#     prefix_colon=None,
#     explicit_start=None,
#     explicit_end=None,
#     version=None,
# ):
#     import srsly.ruamel_yaml  # NOQA
# 
#     return srsly.ruamel_yaml.round_trip_dump(
#         data,
#         stream=stream,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )


# Path: srsly/tests/ruamel_yaml/test_copy.py
import copy
import pytest  # NOQA
from .roundtrip import dedent, round_trip_load, round_trip_dump

        data_copy["a"].fa.set_block_style()
        assert data["a"].fa.flow_style() == data_copy["a"].fa.flow_style()
        assert data["a"].fa._flow_style is False
        assert data_copy["a"].fa._flow_style is False
        y = round_trip_dump(data_copy)
        z = round_trip_dump(data)
        assert y == z

        assert y == dedent(
            """\
        a:
          foo: bar
          baz: quux
        """
        )

    def test_copy_flow_style_nested_list(self):
        x = dedent(
            """\
        a: [1, 2, 3]
        """
        )
        data = round_trip_load(x)
        assert data["a"].fa.flow_style() is True
        data_copy = copy.copy(data)
        assert data_copy["a"].fa.flow_style() is True
        data_copy["a"].fa.set_block_style()
        assert data["a"].fa.flow_style() == data_copy["a"].fa.flow_style()
        assert data["a"].fa._flow_style is False
        assert data_copy["a"].fa._flow_style is False

        y = round_trip_dump(data_copy)