code: def token_classification_mappings():
      metrics_mentions_mappings = nested_mappings_from_base_model(
          MentionMetrics
      )
      return {
          "_source": mappings.source(
              excludes=[
                  "predicted",
                  "predicted_as",
                  "predicted_by",
                  "annotated_as",
                  "annotated_by",
                  "score",
                  "predicted_mentions",
                  "mentions",
              ]
          ),
          "properties": {
              "predicted": mappings.keyword_field(),
              "annotated_as": mappings.keyword_field(
                  enable_text_search=True
              ),
              "predicted_as": mappings.keyword_field(
                  enable_text_search=True
              ),
              "score": {"type": "float"},
              "tokens": mappings.keyword_field(),
              "metrics.tokens": nested_mappings_from_base_model(
                  TokenMetrics
              ),
              "metrics.predicted.mentions": metrics_mentions_mappings,
              "metrics.annotated.mentions": metrics_mentions_mappings,
          },
      }
  
file_path: argilla/src/argilla/server/daos/backend/mappings/token_classification.py
imports: from typing import Optional
  from argilla.server.daos.backend.mappings.helpers import mappings
  from argilla.server.daos.backend.query_helpers import nested_mappings_from_base_model
  from argilla.server.pydantic_v1 import BaseModel, Field
label_desc: Use image node_id 1 for calling a global function with example usage: token_classification_mappings() and returns: dict