code: def _find_all_cryptensors(inputs):
      """
      Recursively find all CrypTensors in an input list, tuple, set, or dict.
      """
      cryptensors = []
      for input in inputs:
          if isinstance(input, CrypTensor):
              cryptensors.append(input)
          elif isinstance(input, (list, tuple, set)):
              cryptensors.extend(_find_all_cryptensors(input))
          elif isinstance(input, dict):
              for value in input.values():
                  cryptensors.extend(_find_all_cryptensors(value))
      return cryptensors
  
imports: from contextlib import contextmanager
  import torch
  from .debug import register_validation
  from .gradients import AutogradContext, BaseAutogradContext, get_grad_fn
  from .common import functions
label_desc: Use image node_id 1 for calling a global function with example usage: _find_all_cryptensors(inputs) and returns: cryptensors