class_docstr: A metric definition which will be calculated using raw queried data
class_docstr_tok: ["A","metric","definition","which","will","be","calculated","using","raw","queried","data"]
docstr: ServiceBaseMetric calculation method.
  
  Parameters
  ----------
  records:
      The matched records
  
  Returns
  -------
      The metric result
docstr_tok: ["ServiceBaseMetric","calculation","method",".","Parameters","--","--","--","--","--","records",":","The","matched","records","Returns","--","--","--","-","The","metric","result"]
code: def apply(self, records: Iterable[ServiceRecord]) -> Dict[str, Any]:
      """
      ServiceBaseMetric calculation method.
  
      Parameters
      ----------
      records:
          The matched records
  
      Returns
      -------
          The metric result
      """
      raise NotImplementedError()
  
file_path: argilla/src/argilla/server/services/metrics/models.py
imports: from typing import Any, ClassVar, Dict, Generic, Iterable, List, Optional, TypeVar, Union
  from argilla.server.pydantic_v1 import BaseModel, Field
  from argilla.server.services.search.model import ServiceRecordsQuery
  from argilla.server.services.tasks.commons import ServiceRecord
label_desc: Use image node_id 1 for calling the ServicePythonMetric obj's underlying member method code with example usage: obj.apply(records) without return types