code: def create_sampler(name, model):
      config = find_sampler_config(name)
  
      assert config is not None, f"bad sampler name: {name}"
  
      if model.is_sdxl and config.options.get("no_sdxl", False):
          raise Exception(
              f"Sampler {config.name} is not supported for SDXL"
          )
  
      sampler = config.constructor(model)
      sampler.config = config
  
      return sampler
  
imports: from modules import sd_samplers_kdiffusion, sd_samplers_timesteps, shared
  from modules.sd_samplers_common import samples_to_image_grid, sample_to_image
label_desc: Use image node_id 2 for calling a global function with example usage: create_sampler(name, model) and returns: sampler