def METHOD_NAME(
    total_queries_name: str = TOTAL_QUERIES_NAME,
    total_documents_name: str = TOTAL_DOCUMENTS_NAME,
    min_documents_name: str = MIN_DOCUMENTS_NAME,
    max_documents_name: str = MAX_DOCUMENTS_NAME,
    eval_config: Optional[config_pb2.EvalConfig] = None,
    model_name: str = '',
    output_name: str = '',
    query_key: str = '',
    example_weighted: bool = False) -> metric_types.MetricComputations:
  """Returns metric computations for query statistics."""
  if not query_key:
    raise ValueError('a query_key is required to use QueryStatistics metrics')
  total_queries_key = metric_types.MetricKey(
      name=total_queries_name,
      model_name=model_name,
      output_name=output_name,
      example_weighted=example_weighted)
  total_documents_key = metric_types.MetricKey(
      name=total_documents_name,
      model_name=model_name,
      output_name=output_name,
      example_weighted=example_weighted)
  min_documents_key = metric_types.MetricKey(
      name=min_documents_name,
      model_name=model_name,
      output_name=output_name,
      example_weighted=example_weighted)
  max_documents_key = metric_types.MetricKey(
      name=max_documents_name,
      model_name=model_name,
      output_name=output_name,
      example_weighted=example_weighted)
  return [
      metric_types.MetricComputation(
          keys=[
              total_queries_key, total_documents_key, min_documents_key,
              max_documents_key
          ],
          preprocessors=None,
          combiner=_QueryStatisticsCombiner(total_queries_key,
                                            total_documents_key,
                                            min_documents_key,
                                            max_documents_key, eval_config,
                                            model_name, output_name,
                                            example_weighted))
  ]