def METHOD_NAME(signal, method="emd", n_components=None, **kwargs):
    """**Decompose a signal**
    Signal decomposition into different sources using different methods, such as Empirical Mode
    Decomposition (EMD) or Singular spectrum analysis (SSA)-based signal separation method.
    The extracted components can then be recombined into meaningful sources using
    :func:`.signal_recompose`.
    Parameters
    -----------
    signal : Union[list, np.array, pd.Series]
        Vector of values.
    method : str
        The decomposition method. Can be one of ``"emd"`` or ``"ssa"``.
    n_components : int
        Number of components to extract. Only used for ``"ssa"`` method. If ``None``, will default
        to 50.
    **kwargs
        Other arguments passed to other functions.
    Returns
    -------
    Array
        Components of the decomposed signal.
    See Also
    --------
    signal_recompose
    Examples
    --------
    .. ipython:: python
      import neurokit2 as nk
      # Create complex signal
      signal = nk.signal_simulate(duration=10, frequency=1, noise=0.01)  # High freq
      signal += 3 * nk.signal_simulate(duration=10, frequency=3, noise=0.01)  # Higher freq
      signal += 3 * np.linspace(0, 2, len(signal))  # Add baseline and trend
      signal += 2 * nk.signal_simulate(duration=10, frequency=0.1, noise=0)
      @savefig p_signal_decompose1.png scale=100%
      nk.signal_plot(signal)
      @suppress
      plt.close()
    .. ipython:: python
      :okexcept:
      # Example 1: Using the EMD method
      components = nk.signal_decompose(signal, method="emd")
      # Visualize Decomposed Signal Components
      @savefig p_signal_decompose2.png scale=100%
      nk.signal_plot(components)
      @suppress
      plt.close()
    .. ipython:: python
      # Example 2: USing the SSA method
      components = nk.signal_decompose(signal, method="ssa", n_components=5)
      # Visualize Decomposed Signal Components
      @savefig p_signal_decompose3.png scale=100%
      nk.signal_plot(components)  # Visualize components
      @suppress
      plt.close()
    """
    # Apply method
    method = method.lower()
    if method in ["emd"]:
        components = _signal_decompose_emd(signal, **kwargs)
    elif method in ["ssa"]:
        components = _signal_decompose_ssa(signal, n_components=n_components)
    else:
        raise ValueError(
            "NeuroKit error: signal_decompose(): 'method' should be one of 'emd' or 'ssa'."
        )
    return components