docs: def _build_app_models(request, admin_apps, models_tuples, ensure_all_models=False):
      """
      :param request: Request object
      :param admin_apps: The apps registered with the admin instance
      :param models_tuples: A list of (fully-qualified model name, config_dict) tuples
      :return:
      """
  
      app_models = []
      for app_and_model, config in models_tuples:
          if app_and_model:
              app_label, model_name = app_and_model.split('.')
  
              for app in admin_apps:
                  if app['app_label'] == app_label:
                      for model in app['models']:
                          if model['object_name'] == model_name:
                              try:
                                  model['name'] = \
                                      config['name']
                              except KeyError:
                                  pass
  
                              # Get each of the polymorphic types to allow addition.
                              model_class = apps.get_model(app_and_model)
                              model_admin = admin.site._registry[model_class]
  
                              if hasattr(model_admin, 'get_child_type_choices'):
                                  model['polymorphic_classes'] = \
                                      model_admin.get_child_type_choices(
                                          request, 'add'
                                      )
  
                              # TODO: Fluent/polymorphic has a way of sorting child order which should be used instead
                              if 'default_poly_child' in config.keys():
                                  ct = ContentType.objects.get_by_natural_key(
                                      *config['default_poly_child'].lower().split('.')
                                  )
                                  model.default_poly_child = ct.id
  
                              app_models.append(model)
  
                      break
  
      return app_models