code: def _interpolate_bads_meg(
      inst,
      mode="accurate",
      origin=(0.0, 0.0, 0.04),
      verbose=None,
      ref_meg=False,
  ):
      return _interpolate_bads_meeg(
          inst,
          mode,
          origin,
          ref_meg=ref_meg,
          eeg=False,
          verbose=verbose,
      )
  
imports: import numpy
  from numpy.polynomial.legendre import legval
  from scipy.interpolate import RectBivariateSpline
  from scipy.linalg import pinv
  from scipy.spatial.distance import pdist, squareform
  from .._fiff.meas_info import _simplify_info
  from .._fiff.pick import pick_channels, pick_info, pick_types
  from ..surface import _normalize_vectors
  from ..utils import _validate_type, logger, verbose, warn
label_desc: Use image node_id 7 for calling a global function with example usage: _interpolate_bads_meg(inst, mode, origin, verbose, ref_meg) and returns: _interpolate_bads_meeg