code: def get_histogram_rate_and_exported_jobs_by_name(
      prometheus_client: PrometheusConnect,
      metric_name: str,
      labels: Dict[str, str] = {},
  ):
      query = f"rate({metric_name}_bucket[1m])"
      if labels:
          label_list = [
              str(key + "=" + "'" + labels[key] + "'") for key in labels
          ]
          query = (
              "rate("
              + metric_name
              + "_bucket"
              + "{"
              + ",".join(label_list)
              + "}"
              + "[1m]"
              + ")"
          )
  
      metrics_data = prometheus_client.custom_query(query=query)
      exported_jobs = _extract_exported_jobs(metrics_data)
      return metrics_data, exported_jobs
  
imports: from typing import Dict, Optional
  import requests
  from docarray import DocumentArray
  from opentelemetry.context.context import Context
  from prometheus_api_client import PrometheusConnect
  from jina import Executor, requests
label_desc: Use image node_id 10 for calling a global function with example usage: get_histogram_rate_and_exported_jobs_by_name(prometheus_client, metric_name, labels) and returns: metrics_data,  exported_jobs