code: def _compute_vjp(dy, jacs, multi_measurements, has_partitioned_shots):
      # compute the vector-Jacobian product dy @ jac
      # for a list of dy's and Jacobian matrices.
  
      if logger.isEnabledFor(logging.DEBUG):
          logger.debug(
              "Entry with args=(dy=%s, jacs=%s, multi_measurements=%s, shots=%s) called by=%s",
              dy,
              jacs,
              multi_measurements,
              has_partitioned_shots,
              "::L".join(
                  str(i)
                  for i in inspect.getouterframes(
                      inspect.currentframe(), 2
                  )[1][1:3]
              ),
          )
  
      vjps = []
  
      for dy_, jac_, multi in zip(dy, jacs, multi_measurements):
          dy_ = dy_ if has_partitioned_shots else (dy_,)
          jac_ = jac_ if has_partitioned_shots else (jac_,)
  
          shot_vjps = []
          for d, j in zip(dy_, jac_):
              if multi:
                  shot_vjps.append(
                      qml.gradients.compute_vjp_multi(d, j)
                  )
              else:
                  shot_vjps.append(
                      qml.gradients.compute_vjp_single(d, j)
                  )
  
          vjp = qml.math.sum(qml.math.stack(shot_vjps), 0)
  
          if not context.executing_eagerly():
              vjp = qml.math.unstack(vjp)
  
          vjps.extend(vjp)
  
      return vjps
  
file_path: pennylane/pennylane/workflow/interfaces/tensorflow.py
imports: import inspect
  import logging
  import tensorflow
  from tensorflow.python.eager import context
  import pennylane
  from pennylane.measurements import Shots
  from pennylane.transforms import convert_to_numpy_parameters
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_vjp(dy, jacs, multi_measurements, has_partitioned_shots) and returns: vjps