code: def _forward_input_baseline(
      X: Union[List[np.ndarray], np.ndarray],
      bls: Union[List[np.ndarray], np.ndarray],
      model: tf.keras.Model,
      layer: tf.keras.layers.Layer,
      orig_call: Callable,
      forward_kwargs: Optional[dict] = None,
      forward_to_inputs: bool = False,
  ) -> Tuple[Union[list, tf.Tensor], Union[list, tf.Tensor]]:
      """
      Forwards inputs and baselines to the layer's inputs or outputs.
  
      Parameters
      ----------
      X
          Input data points.
      bls
          Baselines.
      model
          `tensorflow` model.
      layer
          Desired layer output.
      orig_call
          Original `call` method of layer.
      forward_kwargs
          Input keyword args.
      forward_to_inputs
          If ``True``, `X` and bls are forwarded to the layer's input. If ``False``, they are forwarded to
          the layer's outputs.
  
      Returns
      -------
      Forwarded inputs and baselines as a `numpy` arrays.
  
      """
      if forward_kwargs is None:
          forward_kwargs = {}
      if layer is not None:
          X_layer = _run_forward_to_layer(
              model,
              layer,
              orig_call,
              X,
              forward_kwargs=forward_kwargs,
              run_to_layer_inputs=forward_to_inputs,
          )
          bls_layer = _run_forward_to_layer(
              model,
              layer,
              orig_call,
              bls,
              forward_kwargs=forward_kwargs,
              run_to_layer_inputs=forward_to_inputs,
          )
  
          if isinstance(X_layer, tuple):
              X_layer = list(X_layer)
  
          if isinstance(bls_layer, tuple):
              bls_layer = list(bls_layer)
  
          return X_layer, bls_layer
  
      else:
          return X, bls
  
imports: import copy
  import logging
  import string
  import warnings
  from enum import Enum
  from typing import Callable, List, Optional, Tuple, Union, cast
  import numpy
  import tensorflow
  from alibi.api.defaults import DEFAULT_DATA_INTGRAD, DEFAULT_META_INTGRAD
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.utils.approximation_methods import approximation_parameters
label_desc: Use image node_id 6 for calling a global function with example usage: _forward_input_baseline(X, bls, model, layer, orig_call, forward_kwargs, forward_to_inputs) and returns: X_layer,  bls_layer, X,  bls