code: def find_parameters(module):
      assert isinstance(module, nn.Module)
  
      # If called within DataParallel, parameters won't appear in module.parameters().
      if getattr(module, "_is_replica", False):
  
          def find_tensor_attributes(module):
              tuples = [
                  (k, v)
                  for k, v in module.__dict__.items()
                  if torch.is_tensor(v) and v.requires_grad
              ]
              return tuples
  
          gen = module._named_members(
              get_members_fn=find_tensor_attributes
          )
          return [param for _, param in gen]
      else:
          return list(module.parameters())
  
file_path: torchdiffeq/torchdiffeq/_impl/adjoint.py
imports: import warnings
  import torch
  import torch.nn
  from .odeint import SOLVERS, odeint
  from .misc import _check_inputs, _flat_to_shape, _mixed_norm, _all_callback_names, _all_adjoint_callback_names
label_desc: Use image node_id 2 for calling a global function with example usage: find_parameters(module) and returns: unknown, list, tuples