def METHOD_NAME(self, superset, subset):
    assert type(superset) is type(subset)
    if isinstance(superset, dict):
        for key, value in subset.items():
            assert key in superset
            super_value = superset[key]
            self.METHOD_NAME(super_value, value)
    elif isinstance(superset, list):
        self.assertEqual(len(superset), len(subset))
        try:
            sorted_superset = sorted(superset)
            sorted_subset = sorted(subset)
        except TypeError:
            sorted_superset = superset
            sorted_subset = subset
        for super_value, value in zip(sorted_superset, sorted_subset):
            self.METHOD_NAME(super_value, value)
    else:
        self.assertEqual(superset, subset)