code: def _extract_unshifted(
      recipe, at_least_one_unshifted, f0, gradient_tapes, tape
  ):
      """Exctract the unshifted term from a gradient recipe, if it is present.
  
      Returns:
          array_like[float]: The reduced recipe without the unshifted term.
          bool: The updated flag whether an unshifted term was found for any of the recipes.
          float or None: The coefficient of the unshifted term. None if no such term was present.
  
      This assumes that there will be at most one unshifted term in the recipe (others simply are
      not extracted) and that it comes first if there is one.
      """
      first_c, first_m, first_s = recipe[0]
      # Extract zero-shift term if present (if so, it will always be the first)
      if first_s == 0 and first_m == 1:
          # Gradient recipe includes a term with zero shift.
          if not at_least_one_unshifted and f0 is None:
              # Append the unshifted tape to the gradient tapes, if not already present
              gradient_tapes.insert(0, tape)
  
          # Store the unshifted coefficient. It is always the first coefficient due to processing
          unshifted_coeff = first_c
          at_least_one_unshifted = True
          recipe = recipe[1:]
      else:
          unshifted_coeff = None
  
      return recipe, at_least_one_unshifted, unshifted_coeff
  
imports: from typing import Sequence, Callable
  from functools import partial
  import numpy
  import pennylane
  from pennylane.measurements import VarianceMP
  from pennylane import transform
  from pennylane.transforms.tape_expand import expand_invalid_trainable
  from pennylane.gradients.gradient_transform import _contract_qjac_with_cjac
  from .finite_difference import finite_diff
  from .general_shift_rules import _iterate_shift_rule, frequencies_to_period, generate_shifted_tapes, process_shifts
  from .gradient_transform import _all_zero_grad, assert_no_state_returns, assert_no_tape_batching, assert_multimeasure_not_broadcasted, choose_trainable_params, find_and_validate_gradient_methods, _no_trainable_grad, reorder_grads
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_unshifted(recipe, at_least_one_unshifted, f0, gradient_tapes, tape) and returns: recipe,  at_least_one_unshifted,  unshifted_coeff