code: def create_named_schedule_sampler(name, diffusion):
      """
      Create a ScheduleSampler from a library of pre-defined samplers.
  
      :param name: the name of the sampler.
      :param diffusion: the diffusion object to sample for.
      """
      if name == "uniform":
          return UniformSampler(diffusion)
      else:
          raise NotImplementedError(f"unknown schedule sampler: {name}")
  
file_path: StableDiffusion/ldm/modules/karlo/kakao/modules/resample.py
imports: from abc import abstractmethod
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: create_named_schedule_sampler(name, diffusion) and returns: UniformSampler