code: def _recursiveFindNodes(root, node_type="switch"):
      from hyperopt.pyll.base import Apply
  
      nodes = []
      if isinstance(root, (list, tuple)):
          for node in root:
              nodes.extend(_recursiveFindNodes(node, node_type))
      elif isinstance(root, dict):
          for node in root.values():
              nodes.extend(_recursiveFindNodes(node, node_type))
      elif isinstance(root, (Apply)):
          if root.name == node_type:
              nodes.append(root)
  
          for node in root.pos_args:
              if node.name == node_type:
                  nodes.append(node)
          for _, node in root.named_args:
              if node.name == node_type:
                  nodes.append(node)
      return nodes
  
imports: from functools import partial
  import numpy
  from recbole.utils.utils import dict2str
label_desc: Use image node_id 1 for calling a global function with example usage: _recursiveFindNodes(root, node_type) and returns: nodes