(cls, *schemas)
return schema
Merges two ExportDataSchemas together

        :param schema1: The first ExportDataSchema
        :param schema2: The second ExportDataSchema
        :returns: The merged ExportDataSchema
Merges two ExportDataSchemas together
Merges two ExportDataSchemas together
def _merge_schemas(cls, *schemas):
        """Merges two ExportDataSchemas together

        :param schema1: The first ExportDataSchema
        :param schema2: The second ExportDataSchema
        :returns: The merged ExportDataSchema
        """

        schema = cls()

        def resolvefn(group_schema1, group_schema2):

            def keyfn(export_item):
                return export_item

            group_schema1.last_occurrences = _merge_dicts(
                group_schema1.last_occurrences,
                group_schema2.last_occurrences,
                max
            )
            group_schema1.inferred = group_schema1.inferred or group_schema2.inferred
            items = _merge_lists(
                group_schema1.items,
                group_schema2.items,
                keyfn=keyfn,
                resolvefn=lambda item1, item2: item1.__class__.merge(item1, item2),
            )
            group_schema1.items = items
            return group_schema1

        previous_group_schemas = schemas[0].group_schemas
        last_app_versions = schemas[0].last_app_versions
        for current_schema in schemas[1:]:
            group_schemas = _merge_lists(
                previous_group_schemas,
                current_schema.group_schemas,
                keyfn=lambda group_schema: _path_nodes_to_string(group_schema.path),
                resolvefn=resolvefn,
            )
            previous_group_schemas = group_schemas
            last_app_versions = _merge_dicts(
                last_app_versions,
                current_schema.last_app_versions,
                max,
            )

        schema.group_schemas = group_schemas
        schema.last_app_versions = last_app_versions

        return schema
def _merge_schemas ( cls , * schemas ) : schema = cls ( ) def resolvefn ( group_schema1 , group_schema2 ) : def keyfn ( export_item ) : return export_item group_schema1 . last_occurrences = _merge_dicts ( group_schema1 . last_occurrences , group_schema2 . last_occurrences , max ) group_schema1 . inferred = group_schema1 . inferred or group_schema2 . inferred items = _merge_lists ( group_schema1 . items , group_schema2 . items , keyfn = keyfn , resolvefn = lambda item1 , item2 : item1 . __class__ . merge ( item1 , item2 ) , ) group_schema1 . items = items return group_schema1 previous_group_schemas = schemas [ 0 ] . group_schemas last_app_versions = schemas [ 0 ] . last_app_versions for current_schema in schemas [ 1 : ] : group_schemas = _merge_lists ( previous_group_schemas , current_schema . group_schemas , keyfn = lambda group_schema : _path_nodes_to_string ( group_schema . path ) , resolvefn = resolvefn , ) previous_group_schemas = group_schemas last_app_versions = _merge_dicts ( last_app_versions , current_schema . last_app_versions , max , ) schema . group_schemas = group_schemas schema . last_app_versions = last_app_versions return schema