code: def scalar_sampler(sampler):
      """Sampler for scalars in RANGE quantized to QUANTIZE."""
      low, high = sampler.RANGE[0], sampler.RANGE[1]
      rand_fun, q = rand.rand_types[sampler.RAND_TYPE], sampler.QUANTIZE
      return rand_fun(low, high, q)
  
file_path: pycls/pycls/sweep/samplers.py
imports: import numpy
  import pycls.core.builders
  import pycls.core.net
  import pycls.models.regnet
  import pycls.sweep.random
  from pycls.core.config import cfg
  from pycls.sweep.random import validate_rand
label_desc: Use image node_id 1 for calling a global function with example usage: scalar_sampler(sampler) and returns: rand_fun