code: def extract_surface_algorithm(
      inp,
      pass_pointid=False,
      pass_cellid=False,
      nonlinear_subdivision=1,
  ):
      """Add vtkDataSetSurfaceFilter to pipeline.
  
      Parameters
      ----------
      inp : pyvista.Common
          Input data to be filtered.
      pass_pointid : bool, default: False
          If ``True``, pass point IDs to the output.
      pass_cellid : bool, default: False
          If ``True``, pass cell IDs to the output.
      nonlinear_subdivision : int, default: 1
          Level of nonlinear subdivision.
  
      Returns
      -------
      vtk.vtkDataSetSurfaceFilter
          Surface filter applied to the input data.
      """
      surf_filter = _vtk.vtkDataSetSurfaceFilter()
      surf_filter.SetPassThroughPointIds(pass_pointid)
      surf_filter.SetPassThroughCellIds(pass_cellid)
      if nonlinear_subdivision != 1:
          surf_filter.SetNonlinearSubdivisionLevel(
              nonlinear_subdivision
          )
      set_algorithm_input(surf_filter, inp)
      return surf_filter
  
imports: import traceback
  import numpy
  import pyvista
  from pyvista.core.errors import PyVistaPipelineError
  from pyvista.core.utilities.helpers import wrap
  from pyvista.plotting import _vtk
label_desc: Use image node_id 4 for calling a global function with example usage: extract_surface_algorithm(inp, pass_pointid, pass_cellid, nonlinear_subdivision) and returns: surf_filter