code: def _contract_qjac_with_cjac(qhess, cjac, tape):
      """Contract a quantum Jacobian with a classical preprocessing Jacobian."""
      if len(tape.measurements) > 1:
          qhess = qhess[0]
      has_single_arg = False
      if not isinstance(cjac, tuple):
          has_single_arg = True
          cjac = (cjac,)
  
      # The classical Jacobian for each argument has shape:
      #   (# gate_args, *qnode_arg_shape)
      # The Jacobian needs to be contracted twice with the quantum Hessian of shape:
      #   (*qnode_output_shape, # gate_args, # gate_args)
      # The result should then have the shape:
      #   (*qnode_output_shape, *qnode_arg_shape, *qnode_arg_shape)
      hessians = []
  
      for jac in cjac:
          if jac is not None:
              hess = _process_jacs(jac, qhess)
              hessians.append(hess)
  
      return hessians[0] if has_single_arg else tuple(hessians)
  
imports: import itertools
  import warnings
  from functools import partial
  from typing import Sequence, Callable
  import numpy
  import pennylane
  from pennylane.measurements import ProbabilityMP, StateMP, VarianceMP
  from pennylane.transforms import transform
  from .general_shift_rules import _combine_shift_rules, generate_multishifted_tapes, generate_shifted_tapes
  from .gradient_transform import find_and_validate_gradient_methods
  from .parameter_shift import _get_operation_recipe
  from .hessian_transform import _process_jacs
label_desc: Use image node_id 8 for calling a global function with example usage: _contract_qjac_with_cjac(qhess, cjac, tape) and returns: unknown