code: def test_pointset_from_vtk():
      vtk_pset = vtk.vtkPointSet()
  
      np_points = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]])
      points = pv.vtk_points(np_points, deep=False)
      vtk_pset.SetPoints(points)
  
      pset = pv.PointSet(vtk_pset, deep=False)
      assert pset.n_points == 2
  
      # test that data is shallow copied
  
      np_points[:] = [[1.0, 0.0, 0.0], [0.0, 0.0, 1.0]]
      assert np.array_equal(np_points, pset.points)
  
      # test that data is deep copied
  
      np_points = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]])
      point_copy = np_points.copy()
      points = pv.vtk_points(np_points, deep=False)
      vtk_pset.SetPoints(points)
  
      pset = pv.PointSet(vtk_pset, deep=True)
  
      np_points[:] = np.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0]])
      assert not np.array_equal(np_points, pset.points)
      assert np.array_equal(pset.points, point_copy)
  
imports: import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista.core.errors import PointSetCellOperationError, PointSetDimensionReductionError, PointSetNotSupported
label_desc: Use image node_id 2 for calling a global function with example usage: test_pointset_from_vtk() without return types