#NEWLINE# def lazy_related_operation( function , model , * related_models , **kwargs ) : #NEWLINE# #INDENT# '\n    Schedule `function` to be called once `model` and all `related_models`\n    have been imported and registered with the app registry. `function` will\n    be called with the newly-loaded model classes as its positional arguments,\n    plus any optional keyword arguments.\n\n    The `model` argument must be a model class. Each subsequent positional\n    argument is another model, or a reference to another model - see\n    `resolve_relation()` for the various forms these may take. Any relative\n    references will be resolved relative to `model`.\n\n    This is a convenience wrapper for `Apps.lazy_model_operation` - the app\n    registry model used is the one found in `model._meta.apps`.\n    ' #NEWLINE# models = ( [ model ] + [ resolve_relation ( model , rel ) for rel in apps ] ) #NEWLINE# model_keys = ( make_model_tuple ( m ) for m in models ) #NEWLINE# apps = model . _meta . apps #NEWLINE# return apps . lazy_model_operation ( partial ( function , ** kwargs ) , * model_keys )