code: def _my_hilbert(x, n_fft=None, envelope=False):
      """Compute Hilbert transform of signals w/ zero padding.
  
      Parameters
      ----------
      x : array, shape (n_times)
          The signal to convert
      n_fft : int
          Size of the FFT to perform, must be at least ``len(x)``.
          The signal will be cut back to original length.
      envelope : bool
          Whether to compute amplitude of the hilbert transform in order
          to return the signal envelope.
  
      Returns
      -------
      out : array, shape (n_times)
          The hilbert transform of the signal, or the envelope.
      """
      n_x = x.shape[-1]
      out = signal.hilbert(x, N=n_fft, axis=-1)[..., :n_x]
      if envelope:
          out = np.abs(out)
      return out
  
imports: from collections import Counter
  from copy import deepcopy
  from functools import partial
  from math import gcd
  import numpy
  from scipy import fft, signal
  from scipy.stats import f
  from ._fiff.pick import _picks_to_idx
  from ._ola import _COLA
  from .cuda import _fft_multiply_repeated, _fft_resample, _setup_cuda_fft_multiply_repeated, _setup_cuda_fft_resample, _smart_pad
  from .parallel import parallel_func
  from .utils import _check_option, _check_preload, _ensure_int, _pl, _validate_type, logger, sum_squared, verbose, warn
label_desc: Use image node_id 34 for calling a global function with example usage: _my_hilbert(x, n_fft, envelope) and returns: out