code: def get_sampler_config(params: SamplingParams):
      discretization_config = get_discretization_config(params)
      guider_config = get_guider_config(params)
      sampler = None
      if params.sampler == Sampler.EULER_EDM:
          return EulerEDMSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              s_churn=params.s_churn,
              s_tmin=params.s_tmin,
              s_tmax=params.s_tmax,
              s_noise=params.s_noise,
              verbose=True,
          )
      if params.sampler == Sampler.HEUN_EDM:
          return HeunEDMSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              s_churn=params.s_churn,
              s_tmin=params.s_tmin,
              s_tmax=params.s_tmax,
              s_noise=params.s_noise,
              verbose=True,
          )
      if params.sampler == Sampler.EULER_ANCESTRAL:
          return EulerAncestralSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              eta=params.eta,
              s_noise=params.s_noise,
              verbose=True,
          )
      if params.sampler == Sampler.DPMPP2S_ANCESTRAL:
          return DPMPP2SAncestralSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              eta=params.eta,
              s_noise=params.s_noise,
              verbose=True,
          )
      if params.sampler == Sampler.DPMPP2M:
          return DPMPP2MSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              verbose=True,
          )
      if params.sampler == Sampler.LINEAR_MULTISTEP:
          return LinearMultistepSampler(
              num_steps=params.steps,
              discretization_config=discretization_config,
              guider_config=guider_config,
              order=params.order,
              verbose=True,
          )
  
      raise ValueError(f"unknown sampler {params.sampler}!")
  
imports: import pathlib
  from dataclasses import asdict, dataclass
  from enum import Enum
  from typing import Optional
  from omegaconf import OmegaConf
  from sgm.inference.helpers import Img2ImgDiscretizationWrapper, do_img2img, do_sample
  from sgm.modules.diffusionmodules.sampling import DPMPP2MSampler, DPMPP2SAncestralSampler, EulerAncestralSampler, EulerEDMSampler, HeunEDMSampler, LinearMultistepSampler
  from sgm.util import load_model_from_config
label_desc: Use image node_id 3 for calling a global function with example usage: get_sampler_config(params) and returns: EulerEDMSampler, HeunEDMSampler, EulerAncestralSampler, DPMPP2SAncestralSampler, DPMPP2MSampler, LinearMultistepSampler