code: def check_regnet_constraints(constraints):
      """Checks RegNet specific constraints."""
      if cfg.MODEL.TYPE == "regnet":
          wa, w0, wm, d = (
              cfg.REGNET.WA,
              cfg.REGNET.W0,
              cfg.REGNET.WM,
              cfg.REGNET.DEPTH,
          )
          _, _, num_s, max_s, _, _ = regnet.generate_regnet(
              wa, w0, wm, d, 8
          )
          num_stages = constraints.REGNET.NUM_STAGES
          if (
              num_s != max_s
              or not num_stages[0] <= num_s <= num_stages[1]
          ):
              return False
      return True
  
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 8 for calling a global function with example usage: check_regnet_constraints(constraints) and returns: True, False