code: def nested_mappings_from_base_model(
      model_class: Type[BaseModel],
  ) -> Dict[str, Any]:
      def resolve_mapping(info) -> Dict[str, Any]:
          the_type = info.get("type")
          if the_type == "number":
              return {"type": "float"}
          if the_type == "integer":
              return {"type": "integer"}
          return mappings.keyword_field(enable_text_search=True)
  
      return {
          "type": "nested",
          "include_in_root": True,
          "properties": {
              key: resolve_mapping(info)
              for key, info in model_class.schema()[
                  "properties"
              ].items()
          },
      }
  
imports: from enum import Enum
  from typing import Any, Dict, List, Optional, Type, Union
  from argilla.server.commons.models import TaskStatus
  from argilla.server.daos.backend.mappings.helpers import mappings
  from argilla.server.pydantic_v1 import BaseModel
label_desc: Use image node_id 1 for calling a global function with example usage: nested_mappings_from_base_model(model_class) and returns: dict, mappings, dict, dict