code: def make_stc_from_dipoles(dipoles, src, verbose=None):
      """Convert a list of spatio-temporal dipoles into a SourceEstimate.
  
      Parameters
      ----------
      dipoles : Dipole | list of instances of Dipole
          The dipoles to convert.
      src : instance of SourceSpaces
          The source space used to generate the forward operator.
      %(verbose)s
  
      Returns
      -------
      stc : SourceEstimate
          The source estimate.
      """
      logger.info("Converting dipoles into a SourceEstimate.")
      if isinstance(dipoles, Dipole):
          dipoles = [dipoles]
      if not isinstance(dipoles, list):
          raise ValueError(
              "Dipoles must be an instance of Dipole or "
              "a list of instances of Dipole. "
              "Got %s!" % type(dipoles)
          )
      tmin = dipoles[0].times[0]
      tstep = dipoles[0].times[1] - tmin
      X = np.zeros((len(dipoles), len(dipoles[0].times)))
      source_rr = np.concatenate(
          [_src["rr"][_src["vertno"], :] for _src in src], axis=0
      )
      n_lh_points = len(src[0]["vertno"])
      lh_vertno = list()
      rh_vertno = list()
      for i in range(len(dipoles)):
          if not np.all(dipoles[i].pos == dipoles[i].pos[0]):
              raise ValueError(
                  "Only dipoles with fixed position over time "
                  "are supported!"
              )
          X[i] = dipoles[i].amplitude
          idx = np.all(source_rr == dipoles[i].pos[0], axis=1)
          idx = np.where(idx)[0][0]
          if idx < n_lh_points:
              lh_vertno.append(src[0]["vertno"][idx])
          else:
              rh_vertno.append(src[1]["vertno"][idx - n_lh_points])
      vertices = [
          np.array(lh_vertno).astype(int),
          np.array(rh_vertno).astype(int),
      ]
      stc = SourceEstimate(
          X,
          vertices=vertices,
          tmin=tmin,
          tstep=tstep,
          subject=src._subject,
      )
      logger.info("[done]")
      return stc
  
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 9 for calling a global function with example usage: make_stc_from_dipoles(dipoles, src, verbose) and returns: stc