code: def make_inverse_resolution_matrix(
      forward,
      inverse_operator,
      method="dSPM",
      lambda2=1.0 / 9.0,
      verbose=None,
  ):
      """Compute resolution matrix for linear inverse operator.
  
      Parameters
      ----------
      forward : instance of Forward
          Forward Operator.
      inverse_operator : instance of InverseOperator
          Inverse operator.
      method : 'MNE' | 'dSPM' | 'sLORETA'
          Inverse method to use (MNE, dSPM, sLORETA).
      lambda2 : float
          The regularisation parameter.
      %(verbose)s
  
      Returns
      -------
      resmat: array, shape (n_orient_inv * n_dipoles, n_orient_fwd * n_dipoles)
          Resolution matrix (inverse operator times forward operator).
          The result of applying the inverse operator to the forward operator.
          If source orientations are not fixed, all source components will be
          computed (i.e. for n_orient_inv > 1 or n_orient_fwd > 1).
          The columns of the resolution matrix are the point-spread functions
          (PSFs) and the rows are the cross-talk functions (CTFs).
      """
      # make sure forward and inverse operator match
      inv = inverse_operator
      fwd = _convert_forward_match_inv(forward, inv)
  
      # don't include bad channels
      # only use good channels from inverse operator
      bads_inv = inv["info"]["bads"]
      # good channels
      ch_names = [
          c for c in inv["info"]["ch_names"] if (c not in bads_inv)
      ]
      fwd = pick_channels_forward(fwd, ch_names, ordered=True)
  
      # get leadfield matrix from forward solution
      leadfield = fwd["sol"]["data"]
      invmat = _get_matrix_from_inverse_operator(
          inv, fwd, method=method, lambda2=lambda2
      )
      resmat = invmat.dot(leadfield)
      logger.info(
          "Dimensions of resolution matrix: %d by %d." % resmat.shape
      )
      return resmat
  
imports: from copy import deepcopy
  import numpy
  from mne.minimum_norm.inverse import InverseOperator
  from .._fiff.constants import FIFF
  from .._fiff.pick import pick_channels_forward
  from ..evoked import EvokedArray
  from ..forward.forward import Forward, convert_forward_solution
  from ..label import Label
  from ..source_estimate import _get_src_type, _make_stc, _prepare_label_extraction
  from ..source_space._source_space import SourceSpaces, _get_vertno
  from ..utils import _validate_type, logger, verbose
  from .inverse import apply_inverse
label_desc: Use image node_id 1 for calling a global function with example usage: make_inverse_resolution_matrix(forward, inverse_operator, method, lambda2, verbose) and returns: resmat