nl: call the model.check method with unpacked dictionary kwargs for every model in return value of function apps.get_models,
code: errors = [ model . check ( ** kwargs ) for model in apps . get_models ( ) if app_configs is None or model . _meta . app_config in app_configs ]