code: def per_partition_utility_analysis():
      # Here, we use a local backend for computations. This does not depend on
      # any pipeline framework and it is implemented in pure Python in
      # PipelineDP. It keeps all data in memory and is not optimized for large data.
      # For datasets smaller than ~tens of megabytes, local execution without any
      # framework is faster than local mode with Beam or Spark.
      backend = pipeline_dp.LocalBackend()
  
      # Define the privacy budget available for our computation.
      budget_accountant = pipeline_dp.NaiveBudgetAccountant(
          total_epsilon=1, total_delta=1e-6
      )
  
      restaurant_visits_rows = load_data(FLAGS.input_file)
  
      # Create a UtilityAnalysisEngine instance.
      utility_analysis_engine = UtilityAnalysisEngine(
          budget_accountant, backend
      )
  
      # Create aggregate_params, data_extractors and public partitions.
      aggregate_params = get_aggregate_params()
      data_extractors = get_data_extractors()
      public_partitions = (
          list(range(1, 8)) if FLAGS.public_partitions else None
      )
  
      options = analysis.UtilityAnalysisOptions(
          epsilon=1,
          delta=1e-6,
          aggregate_params=aggregate_params,
          multi_param_configuration=get_multi_params(),
          partitions_sampling_prob=FLAGS.partition_sampling_probability,
      )
      result = utility_analysis_engine.analyze(
          restaurant_visits_rows,
          options,
          data_extractors,
          public_partitions,
      )
  
      budget_accountant.compute_budgets()
  
      # Here's where the lazy iterator initiates computations and gets transformed
      # into actual results
      result = list(result)
  
      # Save the results
      write_to_file(result, FLAGS.output_file)
  
file_path: pipelinedp/examples/restaurant_visits/run_without_frameworks_utility_analysis.py
imports: from absl import app
  from absl import flags
  import pipeline_dp
  import pandas
  import analysis.utility_analysis
  from analysis.utility_analysis_engine import UtilityAnalysisEngine
label_desc: Use image node_id 6 for calling a global function with example usage: per_partition_utility_analysis() without return types