code: def check_complexity_constraints(constraints):
      """Checks complexity constraints."""
      cx, valid = None, True
      for p, v in constraints.CX.items():
          p, min_v, max_v = p.lower(), v[0], v[1]
          if min_v != 0 or max_v != 0:
              cx = cx if cx else net.complexity(builders.get_model())
              min_v = cx[p] if min_v == 0 else min_v
              max_v = cx[p] if max_v == 0 else max_v
              valid = valid and (min_v <= cx[p] <= max_v)
      return valid
  
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 9 for calling a global function with example usage: check_complexity_constraints(constraints) and returns: valid