code: def _window_evoked(evoked, size):
      """Window evoked (size in seconds)."""
      if isinstance(size, (float, int)):
          lsize = rsize = float(size)
      else:
          lsize, rsize = size
      evoked = evoked.copy()
      sfreq = float(evoked.info["sfreq"])
      lsize = int(lsize * sfreq)
      rsize = int(rsize * sfreq)
      lhann = np.hanning(lsize * 2)[:lsize]
      rhann = np.hanning(rsize * 2)[-rsize:]
      window = np.r_[
          lhann, np.ones(len(evoked.times) - lsize - rsize), rhann
      ]
      evoked.data *= window[None, :]
      return evoked
  
imports: import numpy
  from .._fiff.proj import deactivate_proj
  from ..dipole import Dipole
  from ..fixes import _safe_svd
  from ..forward import is_fixed_orient
  from ..minimum_norm.inverse import _check_reference, _log_exp_var, _prepare_forward, combine_xyz
  from ..source_estimate import SourceEstimate, _BaseSourceEstimate, _make_stc
  from ..utils import _check_depth, _check_option, _validate_type, check_random_state, logger, sum_squared, verbose, warn
  from .mxne_optim import _Phi, groups_norm2, iterative_mixed_norm_solver, iterative_tf_mixed_norm_solver, mixed_norm_solver, norm_epsilon_inf, norm_l2inf, tf_mixed_norm_solver
label_desc: Use image node_id 11 for calling a global function with example usage: _window_evoked(evoked, size) and returns: evoked