code: def _check_tune_args(
      options: TuneOptions, is_public_partitions: bool
  ):
      # Check metrics to tune.
      metrics = options.aggregate_params.metrics
      if not metrics:
          # Empty metrics means tuning for select_partitions.
          if is_public_partitions:
              # Empty metrics means that partition selection tuning is performed.
              raise ValueError(
                  "Empty metrics means tuning of partition selection"
                  " but public partitions were provided."
              )
      elif len(metrics) > 1:
          raise ValueError(
              f"Tuning supports only one metric, but {metrics} given."
          )
      else:  # len(metrics) == 1
          if metrics[0] not in [
              pipeline_dp.Metrics.COUNT,
              pipeline_dp.Metrics.PRIVACY_ID_COUNT,
              pipeline_dp.Metrics.SUM,
          ]:
              raise ValueError(
                  f"Tuning is supported only for Count, Privacy id count and Sum, but {metrics[0]} given."
              )
  
      if options.parameters_to_tune.min_sum_per_partition:
          raise ValueError(
              "Tuning of min_sum_per_partition is not supported yet."
          )
  
      if (
          options.function_to_minimize
          != MinimizingFunction.ABSOLUTE_ERROR
      ):
          raise NotImplementedError(
              f"Only {MinimizingFunction.ABSOLUTE_ERROR} is implemented."
          )
  
imports: import logging
  import math
  from numbers import Number
  import pipeline_dp
  from pipeline_dp import dp_computations
  from pipeline_dp import pipeline_backend
  from pipeline_dp import input_validators
  from pipeline_dp.dataset_histograms import histograms
  import analysis
  from analysis import metrics
  from analysis import utility_analysis
  from analysis import dp_strategy_selector
  import dataclasses
  from dataclasses import dataclass
  from typing import Callable, List, Optional, Tuple, Union, Sequence
  from enum import Enum
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: _check_tune_args(options, is_public_partitions) without return types