code: def test_create_modelkit_app(
      required_models_env_var,
      models,
      required_models,
      n_endpoints,
      monkeypatch,
  ):
      if required_models_env_var:
          monkeypatch.setenv(
              "MODELKIT_REQUIRED_MODELS", required_models_env_var
          )
      app = create_modelkit_app(
          models=models, required_models=required_models
      )
      assert len([route.path for route in app.routes]) == n_endpoints
  
imports: import asyncio
  import os
  import platform
  import fastapi
  import pydantic
  import pytest
  from starlette.testclient import TestClient
  from modelkit import testing
  from modelkit.api import ModelkitAutoAPIRouter, create_modelkit_app
  from modelkit.core.errors import ModelsNotFound
  from modelkit.core.model import Asset, AsyncModel, Model
  from tests import TEST_DIR
label_desc: Use image node_id 6 for calling a global function with example usage: test_create_modelkit_app(required_models_env_var, models, required_models, n_endpoints, monkeypatch) without return types