code: def _check_utility_analysis_params(
      options: analysis.UtilityAnalysisOptions,
      data_extractors: Union[
          pipeline_dp.DataExtractors, pipeline_dp.PreAggregateExtractors
      ],
  ):
      # Check correctness of data extractors.
      if options.pre_aggregated_data:
          if not isinstance(
              data_extractors, pipeline_dp.PreAggregateExtractors
          ):
              raise ValueError(
                  "options.pre_aggregated_data is set to true but "
                  "PreAggregateExtractors aren't provided. PreAggregateExtractors"
                  " should be specified for pre-aggregated data."
              )
      elif not isinstance(data_extractors, pipeline_dp.DataExtractors):
          raise ValueError(
              "pipeline_dp.DataExtractors should be specified for raw data."
          )
  
      # Check aggregate_params.
      params = options.aggregate_params
      if params.custom_combiners is not None:
          raise NotImplementedError(
              "custom combiners are not supported"
          )
      if not (
          set(params.metrics).issubset(
              {
                  pipeline_dp.Metrics.COUNT,
                  pipeline_dp.Metrics.SUM,
                  pipeline_dp.Metrics.PRIVACY_ID_COUNT,
              }
          )
      ):
          not_supported_metrics = list(
              set(params.metrics).difference(
                  {
                      pipeline_dp.Metrics.COUNT,
                      pipeline_dp.Metrics.SUM,
                      pipeline_dp.Metrics.PRIVACY_ID_COUNT,
                  }
              )
          )
          raise NotImplementedError(
              f"unsupported metric in metrics={not_supported_metrics}"
          )
      if params.contribution_bounds_already_enforced:
          raise NotImplementedError(
              "utility analysis when contribution bounds are already enforced is "
              "not supported"
          )
  
      if params.post_aggregation_thresholding:
          raise NotImplementedError(
              "Analysis with post_aggregation_thresholding "
              "are not yet implemented"
          )
  
imports: import copy
  from typing import Optional, Union
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import combiners
  from pipeline_dp import contribution_bounders
  from pipeline_dp import pipeline_backend
  import analysis
  import analysis.contribution_bounders
  from analysis import per_partition_combiners
  from analysis import data_structures
label_desc: Use image node_id 1 for calling a global function with example usage: _check_utility_analysis_params(options, data_extractors) without return types