code: def _remove_allpaths(hps, conditions):
      """Hacky way to recognize some kinds of false dependencies
      Better would be logic programming.
      """
      potential_conds = {}
      for k, v in list(hps.items()):
          if v["node"].name == "randint":
              low = v["node"].arg["low"].obj
              # if high is None, the domain is [0, low), else it is [low, high)
              domain_size = (
                  v["node"].arg["high"].obj - low
                  if v["node"].arg["high"] != MissingArgument
                  else low
              )
              potential_conds[k] = frozenset(
                  [EQ(k, ii) for ii in range(domain_size)]
              )
          elif v["node"].name == "categorical":
              p = v["node"].arg["p"].obj
              potential_conds[k] = frozenset(
                  [EQ(k, ii) for ii in range(p.size)]
              )
  
      for k, v in list(hps.items()):
          if len(v["conditions"]) > 1:
              all_conds = [
                  [c for c in cond if c is not True]
                  for cond in v["conditions"]
              ]
              all_conds = [cond for cond in all_conds if len(cond) >= 1]
              if len(all_conds) == 0:
                  v["conditions"] = {conditions}
                  continue
  
              depvar = all_conds[0][0].name
  
              all_one_var = all(
                  len(cond) == 1 and cond[0].name == depvar
                  for cond in all_conds
              )
              if all_one_var:
                  conds = [cond[0] for cond in all_conds]
                  if frozenset(conds) == potential_conds[depvar]:
                      v["conditions"] = {conditions}
                      continue
  
imports: from functools import partial, wraps
  from .base import DuplicateLabel
  from .pyll.base import Apply, Literal, MissingArgument
  from .pyll import scope
  from .pyll import as_apply
label_desc: Use image node_id 18 for calling a global function with example usage: _remove_allpaths(hps, conditions) without return types