code: def _torch_jac(circ):
      """Torch jacobian as a callable function"""
      import torch
  
      def wrapper(*args, **kwargs):
          loss = partial(circ, **kwargs)
          if len(args) > 1:
              return torch.autograd.functional.jacobian(
                  loss, args, create_graph=True
              )
          return torch.autograd.functional.jacobian(
              loss, *args, create_graph=True
          )
  
      return wrapper
  
imports: from functools import partial
  from typing import Callable, Sequence
  import pennylane
  from pennylane.tape import QuantumTape
  from pennylane.devices import DefaultQubit, DefaultQubitLegacy, DefaultMixed
  from pennylane.measurements import StateMP, DensityMatrixMP
  from pennylane.gradients import adjoint_metric_tensor, metric_tensor
  from pennylane import transform
label_desc: Use image node_id 9 for calling a global function with example usage: _torch_jac(circ) and returns: wrapper, torch, torch