# Path: snapshottest/formatters.py
# def default_formatters():
#     return [
#         TypeFormatter(type(None), format_none),
#         DefaultDictFormatter(defaultdict, format_dict),
#         CollectionFormatter(dict, format_dict),
#         CollectionFormatter(tuple, format_tuple),
#         CollectionFormatter(list, format_list),
#         CollectionFormatter(set, format_set),
#         CollectionFormatter(frozenset, format_frozenset),
#         TypeFormatter((str,), format_str),
#         TypeFormatter((float,), format_float),
#         TypeFormatter((int, complex, bool, bytes), format_std_type),
#         GenericFormatter(),
#     ]


from .formatters import default_formatters


class Formatter(object):
    formatters = default_formatters()

    def __init__(self, imports=None):
        self.htchar = " " * 4
        self.lfchar = "\n"
        self.indent = 0
        self.imports = imports

    def __call__(self, value, **args):
        return self.format(value, self.indent)

    def format(self, value, indent):
        formatter = self.get_formatter(value)
        for module, import_name in formatter.get_imports():
            self.imports[module].add(import_name)
        return formatter.format(value, indent, self)


# Path: snapshottest/formatters.py
# def default_formatters():
#     return [
#         TypeFormatter(type(None), format_none),
#         DefaultDictFormatter(defaultdict, format_dict),
#         CollectionFormatter(dict, format_dict),
#         CollectionFormatter(tuple, format_tuple),
#         CollectionFormatter(list, format_list),
#         CollectionFormatter(set, format_set),
#         CollectionFormatter(frozenset, format_frozenset),
#         TypeFormatter((str,), format_str),
#         TypeFormatter((float,), format_float),
#         TypeFormatter((int, complex, bool, bytes), format_std_type),
#         GenericFormatter(),
#     ]


# Path: snapshottest/formatter.py
from .formatters import default_formatters



class Formatter(object):
    formatters = default_formatters()

    def __init__(self, imports=None):
        self.htchar = " " * 4
        self.lfchar = "\n"
        self.indent = 0
        self.imports = imports

    def __call__(self, value, **args):
        return self.format(value, self.indent)

    def format(self, value, indent):
        formatter = self.get_formatter(value)
        for module, import_name in formatter.get_imports():
            self.imports[module].add(import_name)
        return formatter.format(value, indent, self)


    def normalize(self, value):