code: def get_weight_quantization_shared_parameters(param_dict):
      output = {}
      if SHARED_PARAMETERS in param_dict.keys():
          sub_param_dict = param_dict[SHARED_PARAMETERS]
          output[WEIGHT_QUANTIZE_ENABLED] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_ENABLED,
              WEIGHT_QUANTIZE_ENABLED_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_KERNEL] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_KERNEL,
              WEIGHT_QUANTIZE_KERNEL_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_SCHEDULE_OFFSET] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_SCHEDULE_OFFSET,
              WEIGHT_QUANTIZE_SCHEDULE_OFFSET_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_GROUPS] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_GROUPS,
              WEIGHT_QUANTIZE_GROUPS_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_VERBOSE] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_VERBOSE,
              WEIGHT_QUANTIZE_VERBOSE_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_TYPE] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_TYPE,
              WEIGHT_QUANTIZE_TYPE_DEFAULT,
          )
          output[WEIGHT_QUANTIZE_IN_FORWARD_ENABLED] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_IN_FORWARD_ENABLED,
              WEIGHT_QUANTIZE_IN_FORWARD_ENABLED_DEFAULT,
          )
          assert output[WEIGHT_QUANTIZE_TYPE] in [
              WEIGHT_QUANTIZE_SYMMETRIC,
              WEIGHT_QUANTIZE_ASYMMETRIC,
          ], f"Invalid weight quantize type. Supported types: [{WEIGHT_QUANTIZE_SYMMETRIC}, {WEIGHT_QUANTIZE_ASYMMETRIC}]"
          output[WEIGHT_QUANTIZE_ROUNDING] = get_scalar_param(
              sub_param_dict,
              WEIGHT_QUANTIZE_ROUNDING,
              WEIGHT_QUANTIZE_ROUNDING_DEFAULT,
          )
          assert output[WEIGHT_QUANTIZE_ROUNDING] in [
              WEIGHT_QUANTIZE_NEAREST_ROUNDING,
              WEIGHT_QUANTIZE_STOCHASTIC_ROUNDING,
          ], f"Invalid weight quantize rounding. Supported types: [{WEIGHT_QUANTIZE_NEAREST_ROUNDING}, {WEIGHT_QUANTIZE_STOCHASTIC_ROUNDING}]"
          if (
              WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE
              in sub_param_dict.keys()
          ):
              output[
                  WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE
              ] = get_scalar_param(
                  sub_param_dict[WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE],
                  WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE_ENABLED,
                  WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE_ENABLED_DEFAULT,
              )
              output[WEIGHT_QUANTIZE_CHANGE_RATIO] = get_scalar_param(
                  sub_param_dict[WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE],
                  WEIGHT_QUANTIZE_CHANGE_RATIO,
                  WEIGHT_QUANTIZE_CHANGE_RATIO_DEFAULT,
              )
          else:
              output[
                  WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE
              ] = WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE_ENABLED_DEFAULT
              output[
                  WEIGHT_QUANTIZE_CHANGE_RATIO
              ] = WEIGHT_QUANTIZE_CHANGE_RATIO_DEFAULT
      else:
          output[
              WEIGHT_QUANTIZE_ENABLED
          ] = WEIGHT_QUANTIZE_ENABLED_DEFAULT
          output[
              WEIGHT_QUANTIZE_KERNEL
          ] = WEIGHT_QUANTIZE_KERNEL_DEFAULT
          output[
              WEIGHT_QUANTIZE_SCHEDULE_OFFSET
          ] = WEIGHT_QUANTIZE_SCHEDULE_OFFSET_DEFAULT
          output[
              WEIGHT_QUANTIZE_GROUPS
          ] = WEIGHT_QUANTIZE_GROUPS_DEFAULT
          output[
              WEIGHT_QUANTIZE_VERBOSE
          ] = WEIGHT_QUANTIZE_VERBOSE_DEFAULT
          output[WEIGHT_QUANTIZE_TYPE] = WEIGHT_QUANTIZE_TYPE_DEFAULT
          output[
              WEIGHT_QUANTIZE_ROUNDING
          ] = WEIGHT_QUANTIZE_ROUNDING_DEFAULT
          output[
              WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE
          ] = WEIGHT_QUANTIZE_FP16_MIXED_QUANTIZE_ENABLED_DEFAULT
          output[
              WEIGHT_QUANTIZE_CHANGE_RATIO
          ] = WEIGHT_QUANTIZE_CHANGE_RATIO_DEFAULT
      return output
  
imports: from .constants import *
  import copy
  from ..runtime.config_utils import get_scalar_param, get_list_param
label_desc: Use image node_id 7 for calling a global function with example usage: get_weight_quantization_shared_parameters(param_dict) and returns: output