'Return a clone of this registry.'

def clone(self):

    clone = StateApps([], {})
    clone.all_models = copy.deepcopy(self.all_models)
    clone.app_configs = copy.deepcopy(self.app_configs)
    for app_config in clone.app_configs.values():
        app_config.apps = clone
    clone.real_models = self.real_models
    return clone
