code: def find_task_metrics(
      cls, task: TaskType, metric_ids: Set[str]
  ) -> List[ServiceBaseMetric]:
      if not metric_ids:
          return []
  
      metrics = []
      for metric in cls.get_task_metrics(task).metrics:
          if metric.id in metric_ids:
              metrics.append(metric)
      return metrics
  
imports: from typing import List, Optional, Set, Type
  from argilla.server.commons.models import TaskType
  from argilla.server.errors import EntityNotFoundError, WrongTaskError
  from argilla.server.pydantic_v1 import BaseModel
  from argilla.server.services.datasets import ServiceBaseDataset, ServiceDataset
  from argilla.server.services.metrics import ServiceBaseMetric
  from argilla.server.services.metrics.models import ServiceBaseTaskMetrics
  from argilla.server.services.search.model import ServiceRecordsQuery
  from argilla.server.services.tasks.commons import ServiceRecord
label_desc: Use image node_id 9 for calling the TasksFactory obj's underlying member method code with example usage: obj.find_task_metrics(cls, task, metric_ids) and returns: metrics, list