code: def _do_surface_dots(
      intrad, volume, coils, surf, sel, r0, ch_type, lut, n_fact, n_jobs
  ):
      """Compute the map construction products.
  
      Parameters
      ----------
      intrad : float
          The integration radius. It is used to calculate beta as:
          beta = (intrad * intrad) / (r1 * r2)
      volume : bool
          If True, compute a volume integral.
      coils : list of dict
          The coils.
      surf : dict
          The surface on which the field is interpolated.
      sel : array
          Indices of the surface vertices to select.
      r0 : array, shape (3 x 1)
          The origin of the sphere.
      ch_type : str
          The channel type. It can be 'meg' or 'eeg'.
      lut : callable
          Look-up table for Legendre polynomials.
      n_fact : array
          Coefficients in the integration sum.
      %(n_jobs)s
  
      Returns
      -------
      products : array, shape (n_coils, n_coils)
          The integration products.
      """
      # convert to normalized distances from expansion center
      rmags = [coil["rmag"] - r0[np.newaxis, :] for coil in coils]
      rlens = [np.sqrt(np.sum(r * r, axis=1)) for r in rmags]
      rmags = [r / rl[:, np.newaxis] for r, rl in zip(rmags, rlens)]
      cosmags = [coil["cosmag"] for coil in coils]
      ws = [coil["w"] for coil in coils]
      rref = None
      refl = None
      # virt_ref = False
      if ch_type == "eeg":
          intrad = intrad * 0.7
          # The virtual ref code is untested and unused, so it is
          # commented out for now
          # if virt_ref:
          #     rref = virt_ref[np.newaxis, :] - r0[np.newaxis, :]
          #     refl = np.sqrt(np.sum(rref * rref, axis=1))
          #     rref /= refl[:, np.newaxis]
  
      rsurf = surf["rr"][sel] - r0[np.newaxis, :]
      lsurf = np.sqrt(np.sum(rsurf * rsurf, axis=1))
      rsurf /= lsurf[:, np.newaxis]
      this_nn = surf["nn"][sel]
  
      # loop over the coils
      parallel, p_fun, n_jobs = parallel_func(
          _do_surface_dots_subset, n_jobs
      )
      prods = parallel(
          p_fun(
              intrad,
              rsurf,
              rmags,
              rref,
              refl,
              lsurf,
              rlens,
              this_nn,
              cosmags,
              ws,
              volume,
              lut,
              n_fact,
              ch_type,
              idx,
          )
          for idx in np.array_split(np.arange(len(rmags)), n_jobs)
      )
      products = np.sum(prods, axis=0)
      return products
  
file_path: mne-python/mne/forward/_lead_dots.py
imports: import os
  import os.path
  import numpy
  from numpy.polynomial import legendre
  from ..parallel import parallel_func
  from ..utils import _get_extra_data_path, fill_doc, logger, verbose
label_desc: Use image node_id 11 for calling a global function with example usage: _do_surface_dots(intrad, volume, coils, surf, sel, r0, ch_type, lut, n_fact, n_jobs) and returns: products