class_docstr: Extract data from a SurfaceImage.
class_docstr_tok: ["Extract","data","from","a","SurfaceImage","."]
docstr: Transform extracted signal back to surface object.
  
  Parameters
  ----------
  masked_img : numpy.ndarray
      Extracted signal.
  
  Returns
  -------
  SurfaceImage object
      Mesh and data for both hemispheres.
docstr_tok: ["Transform","extracted","signal","back","to","surface","object",".","Parameters","--","--","--","--","--","masked_img",":","numpy.ndarray","Extracted","signal",".","Returns","--","--","--","-","SurfaceImage","object","Mesh","and","data","for","both","hemispheres","."]
code: def inverse_transform(self, masked_img: np.ndarray) -> SurfaceImage:
      """Transform extracted signal back to surface object.
  
      Parameters
      ----------
      masked_img : numpy.ndarray
          Extracted signal.
  
      Returns
      -------
      SurfaceImage object
          Mesh and data for both hemispheres.
      """
      self._check_fitted()
      assert self.mask_img_ is not None
      if masked_img.shape[-1] != self.output_dimension_:
          raise ValueError(
              "Input to inverse_transform has wrong shape; "
              f"last dimension should be {self.output_dimension_}"
          )
      data = {}
      for part_name, mask in self.mask_img_.data.items():
          assert isinstance(mask, np.ndarray)
          data[part_name] = np.zeros(
              (*masked_img.shape[:-1], mask.shape[0]),
              dtype=masked_img.dtype,
          )
          start, stop = self.slices[part_name]
          data[part_name][..., mask] = masked_img[..., start:stop]
      return SurfaceImage(mesh=self.mask_img_.mesh, data=data)
  
imports: from __future__ import annotations
  from typing import Any
  import numpy
  import pandas
  from joblib import Memory
  from sklearn.base import BaseEstimator, TransformerMixin
  from nilearn import signal
  from nilearn._utils.cache_mixin import CacheMixin, cache
  from nilearn._utils.class_inspect import get_params
  from nilearn.experimental.surface._surface_image import PolyMesh, SurfaceImage
label_desc: Use image node_id 7 for calling the SurfaceMasker obj's underlying member method code with example usage: obj.inverse_transform(masked_img) and returns: SurfaceImage