code: def noise_to_thresholding(noise_kind: NoiseKind) -> MechanismType:
      if noise_kind == NoiseKind.LAPLACE:
          return MechanismType.LAPLACE_THRESHOLDING
      if noise_kind == NoiseKind.GAUSSIAN:
          return MechanismType.GAUSSIAN_THRESHOLDING
      raise ValueError(
          f"NoiseKind {noise_kind} can not be converted to "
          f"Thresholding mechanism"
      )
  
imports: import logging
  import math
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Sequence, Callable, Optional, List
  import numpy
  from pipeline_dp import input_validators
label_desc: Use image node_id 1 for calling a global function with example usage: noise_to_thresholding(noise_kind) and returns: MechanismType, MechanismType