code: def prepare_alg_dict(
      alg_type, datasetname, privacy_dp, params_exp, log_reg
  ):
      """prepare update rule for algorithms and filename"""
      alg_dict = None
      filename_params = None
      if alg_type == "double_noise":
          filename_params = (
              "so_"
              + datasetname
              + "_"
              + str(privacy_dp)
              + "_"
              + "DP"
              + "_"
              + str(params_exp["num_iteration"])
              + "_"
              + str(params_exp["grad_frac"])
              + "_"
              + str(params_exp["trace_frac"])
              + "_"
              + str(params_exp["trace_coeff"])
              + ".txt"
          )
          dnm_hess_add = DoubleNoiseMech(
              log_reg, type_reg="add", curvature_info="hessian"
          ).update_rule
          dnm_ub_add = DoubleNoiseMech(
              log_reg, type_reg="add", curvature_info="ub"
          ).update_rule
          dnm_hess_clip = DoubleNoiseMech(
              log_reg, type_reg="clip", curvature_info="hessian"
          ).update_rule
          dnm_ub_clip = DoubleNoiseMech(
              log_reg, type_reg="clip", curvature_info="ub"
          ).update_rule
          alg_dict = {
              "DN-Hess-add": dnm_hess_add,
              "DN-Hess-clip": dnm_hess_clip,
              "DN-UB-clip": dnm_ub_clip,
              "DN-UB-add": dnm_ub_add,
          }
      elif alg_type == "dp_gd":
          filename_params = (
              "gd_"
              + datasetname
              + "_"
              + str(privacy_dp)
              + "_"
              + "DP"
              + "_"
              + str(params_exp["num_iteration"])
              + ".txt"
          )
          alg_dict = {"DPGD": gd_priv}
      elif alg_type == "damped_newton":
          filename_params = (
              "newton_"
              + datasetname
              + "_"
              + str(privacy_dp)
              + "_"
              + "DP"
              + "_"
              + str(params_exp["num_iteration"])
              + ".txt"
          )
          alg_dict = {"private-newton": private_newton}
      return alg_dict, filename_params
  
file_path: privacy/research/dp_newton/src/run.py
imports: import argparse
  import json
  from dataset_loader import Mydatasets
  from my_logistic_regression import MyLogisticRegression
  import numpy
  from opt_algs import CompareAlgs, DoubleNoiseMech, gd_priv, private_newton
  from scipy.optimize import fsolve
label_desc: Use image node_id 4 for calling a global function with example usage: prepare_alg_dict(alg_type, datasetname, privacy_dp, params_exp, log_reg) and returns: alg_dict,  filename_params