code: def prepare_query(self, query: ServiceRecordsQuery):
      text = query.query_text or ""
      if text:
          text += " AND "
      text += " (_exists_:annotated_by OR _exists_:predicted_by)"
  
      query.query_text = text
      return query
  
imports: from typing import Any, ClassVar, Dict, Iterable, List, Optional, Set, Tuple
  from argilla.server.pydantic_v1 import BaseModel, Field
  from argilla.server.services.metrics import ServiceBaseMetric, ServicePythonMetric
  from argilla.server.services.metrics.models import CommonTasksMetrics
  from argilla.server.services.search.model import ServiceRecordsQuery
  from argilla.server.services.tasks.token_classification.model import EntitySpan, ServiceTokenClassificationAnnotation, ServiceTokenClassificationRecord
  from argilla.utils import SpanUtils
label_desc: Use image node_id 1 for calling the DatasetLabels obj's underlying member method code with example usage: obj.prepare_query(query) and returns: query