code: def _dot_product_real(bra, ket, num_wires):
      """Helper for calculating the inner product for adjoint differentiation."""
      # broadcasted inner product not summing over first dimension of the bra tensor
      sum_axes = tuple(range(1, num_wires + 1))
      return qml.math.real(
          qml.math.sum(qml.math.conj(bra) * ket, axis=sum_axes)
      )
  
file_path: pennylane/pennylane/devices/qubit/adjoint_jacobian.py
imports: from numbers import Number
  from typing import Tuple
  import numpy
  import pennylane
  from pennylane.operation import operation_derivative
  from pennylane.tape import QuantumTape
  from .apply_operation import apply_operation
  from .simulate import get_final_state
  from .initialize_state import create_initial_state
label_desc: Use image node_id 1 for calling a global function with example usage: _dot_product_real(bra, ket, num_wires) and returns: qml