code: def _create_sampler(
      dataset,
      built_datasets,
      distribution: str,
      repeatable: bool,
      alpha: float = 1.0,
      base_sampler=None,
  ):
      phases = ["train", "valid", "test"]
      sampler = None
      if distribution != "none":
          if base_sampler is not None:
              base_sampler.set_distribution(distribution)
              return base_sampler
          if not repeatable:
              sampler = Sampler(
                  phases,
                  built_datasets,
                  distribution,
                  alpha,
              )
          else:
              sampler = RepeatableSampler(
                  phases,
                  dataset,
                  distribution,
                  alpha,
              )
      return sampler
  
file_path: RecBole/recbole/data/utils.py
imports: import copy
  import importlib
  import os
  import pickle
  import warnings
  from typing import Literal
  from recbole.data.dataloader import *
  from recbole.sampler import KGSampler, Sampler, RepeatableSampler
  from recbole.utils import ModelType, ensure_dir, get_local_time, set_color
  from recbole.utils.argument_list import dataset_arguments
label_desc: Use image node_id 7 for calling a global function with example usage: _create_sampler(dataset, built_datasets, distribution, repeatable, alpha, base_sampler) and returns: sampler, base_sampler