class_docstr: Text2text service
code: def search(
      self,
      dataset: ServiceDataset,
      query: ServiceText2TextQuery,
      sort_by: List[ServiceSortableField],
      record_from: int = 0,
      size: int = 100,
      exclude_metrics: bool = True,
  ) -> ServiceSearchResults:
      metrics = TasksFactory.find_task_metrics(
          dataset.task,
          metric_ids={
              "words_cloud",
              "predicted_by",
              "annotated_by",
              "status_distribution",
              "metadata",
              "score",
          },
      )
  
      results = self.__search__.search(
          dataset,
          query=query,
          size=size,
          record_from=record_from,
          record_type=ServiceText2TextRecord,
          sort_config=ServiceSortConfig(
              sort_by=sort_by,
          ),
          exclude_metrics=exclude_metrics,
          metrics=metrics,
      )
  
      if results.metrics:
          results.metrics["words"] = results.metrics.get(
              "words_cloud", {}
          )
          results.metrics["status"] = results.metrics[
              "status_distribution"
          ]
  
      return results
  
file_path: argilla/src/argilla/server/services/tasks/text2text/service.py
imports: from typing import Iterable, List, Optional
  from fastapi import Depends
  from argilla.server.commons.config import TasksFactory
  from argilla.server.services.datasets import ServiceDataset
  from argilla.server.services.search.model import ServiceSearchResults, ServiceSortableField, ServiceSortConfig
  from argilla.server.services.search.service import SearchRecordsService
  from argilla.server.services.storage.service import RecordsStorageService
  from argilla.server.services.tasks.commons import BulkResponse
  from argilla.server.services.tasks.text2text.models import ServiceText2TextQuery, ServiceText2TextRecord
label_desc: Use image node_id 3 for calling the Text2TextService obj's underlying member method code with example usage: obj.search(dataset, query, sort_by, record_from, size, exclude_metrics) and returns: results