code: def _get_ml_boundary_execute(
      interface: str, grad_on_execution: bool, device_vjp: bool = False
  ) -> Callable:
      """Imports and returns the function that binds derivatives of the required ml framework.
  
      Args:
          interface (str): The designated ml framework.
  
          grad_on_execution (bool): whether or not the device derivatives are taken upon execution
      Returns:
          Callable
  
      Raises:
          pennylane.QuantumFunctionError if the required package is not installed.
  
      """
      mapped_interface = INTERFACE_MAP[interface]
      try:
          if mapped_interface == "autograd":
              from .interfaces.autograd import (
                  autograd_execute as ml_boundary,
              )
  
          elif mapped_interface == "tf":
              import tensorflow as tf
  
              if not tf.executing_eagerly() or "autograph" in interface:
                  from .interfaces.tensorflow_autograph import (
                      execute as ml_boundary,
                  )
  
                  ml_boundary = partial(
                      ml_boundary, grad_on_execution=grad_on_execution
                  )
  
              else:
                  from .interfaces.tensorflow import (
                      execute as ml_boundary,
                  )
  
          elif mapped_interface == "torch":
              from .interfaces.torch import execute as ml_boundary
  
          elif interface == "jax-jit":
              if device_vjp:
                  from .interfaces.jax_jit import (
                      jax_jit_vjp_execute as ml_boundary,
                  )
              else:
                  from .interfaces.jax_jit import (
                      jax_jit_jvp_execute as ml_boundary,
                  )
          else:  # interface in {"jax", "jax-python", "JAX"}:
              if device_vjp:
                  from .interfaces.jax_jit import (
                      jax_jit_vjp_execute as ml_boundary,
                  )
              else:
                  from .interfaces.jax import (
                      jax_jvp_execute as ml_boundary,
                  )
  
      except ImportError as e:  # pragma: no-cover
          raise qml.QuantumFunctionError(
              f"{mapped_interface} not found. Please install the latest "
              f"version of {mapped_interface} to enable the '{mapped_interface}' interface."
          ) from e
      return ml_boundary
  
file_path: pennylane/pennylane/workflow/execution.py
imports: import inspect
  import warnings
  from functools import wraps, partial
  from typing import Callable, Sequence, Optional, Union, Tuple
  import logging
  from cachetools import LRUCache, Cache
  import pennylane
  from pennylane.tape import QuantumTape
  from pennylane.typing import ResultBatch
  from .set_shots import set_shots
  from .jacobian_products import TransformJacobianProducts, DeviceDerivatives, DeviceJacobianProducts, LightningVJPs
label_desc: Use image node_id 2 for calling a global function with example usage: _get_ml_boundary_execute(interface, grad_on_execution, device_vjp) and returns: ml_boundary