code: def compute_metric(
      client: AuthenticatedClient,
      name: str,
      task: str,
      metric: str,
      query: Optional[str] = None,
      **query_params,
  ) -> Response[
      Union[Dict[str, Any], ErrorMessage, HTTPValidationError]
  ]:
      url = "{}/api/datasets/{task}/{name}/metrics/{metric}:summary".format(
          client.base_url, task=task, name=name, metric=metric
      )
  
      query_params = {
          k: v for k, v in query_params.items() if v is not None
      }
      if query_params:
          url += "?" + "&".join(
              [f"{k}={v}" for k, v in query_params.items()]
          )
  
      if query == "":
          query = None
  
      response = httpx.post(
          url=url,
          headers=client.get_headers(),
          cookies=client.get_cookies(),
          timeout=client.get_timeout(),
          json={"query_text": query},
      )
  
      return build_raw_response(response)
  
file_path: argilla/src/argilla/client/sdk/metrics/api.py
imports: from typing import Any, Dict, List, Optional, Union
  import httpx
  from argilla.client.sdk._helpers import build_raw_response
  from argilla.client.sdk.client import AuthenticatedClient
  from argilla.client.sdk.commons.api import build_list_response
  from argilla.client.sdk.commons.models import ErrorMessage, HTTPValidationError, Response
  from argilla.client.sdk.metrics.models import MetricInfo
label_desc: Use image node_id 2 for calling a global function with example usage: compute_metric(client, name, task, metric, query) and returns: build_raw_response