code: def _format_baseline(
      X: np.ndarray, baselines: Union[None, int, float, np.ndarray]
  ) -> np.ndarray:
      """
      Formats baselines to return a `numpy` array.
  
      Parameters
      ----------
      X
          Input data points.
      baselines
          Baselines.
  
      Returns
      -------
      Formatted inputs and  baselines as a `numpy` arrays.
  
      """
      if baselines is None:
          bls = np.zeros(X.shape).astype(X.dtype)
      elif isinstance(baselines, int) or isinstance(baselines, float):
          bls = np.full(X.shape, baselines).astype(X.dtype)
      elif isinstance(baselines, np.ndarray):
          bls = baselines.astype(X.dtype)
      else:
          raise ValueError(
              f"baselines must be `int`, `float`, `np.ndarray` or `None`. Found {type(baselines)}"
          )
  
      return 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 9 for calling a global function with example usage: _format_baseline(X, baselines) and returns: bls