code: def validate_sampler(param, sampler):
      """Performs various checks on sampler to see if it is valid."""
      if sampler.TYPE in ["int_sampler", "float_sampler"]:
          validate_rand(
              param, sampler.RAND_TYPE, *sampler.RANGE, sampler.QUANTIZE
          )
      elif sampler.TYPE == "regnet_sampler":
          assert (
              param == "REGNET"
          ), "regnet_sampler can only be used for REGNET"
          validate_rand("REGNET.DEPTH", "uniform", *sampler.DEPTH, 1)
          validate_rand("REGNET.W0", "log_uniform", *sampler.W0, 8)
          validate_rand("REGNET.WA", "log_uniform", *sampler.WA, 0.1)
          validate_rand("REGNET.WM", "log_uniform", *sampler.WM, 0.001)
          validate_rand(
              "REGNET.GROUP_W",
              "power2_or_log_uniform",
              *sampler.GROUP_W,
              8,
          )
          validate_rand(
              "REGNET.BOT_MUL",
              "power2_uniform",
              *sampler.BOT_MUL,
              1 / 128,
          )
  
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 5 for calling a global function with example usage: validate_sampler(param, sampler) without return types