code: def test_multi_block_init_vtk():
      multi = vtk.vtkMultiBlockDataSet()
      multi.SetBlock(0, vtk.vtkRectilinearGrid())
      multi.SetBlock(1, vtk.vtkStructuredGrid())
      multi = MultiBlock(multi)
      assert isinstance(multi, MultiBlock)
      assert multi.n_blocks == 2
      assert isinstance(multi.GetBlock(0), RectilinearGrid)
      assert isinstance(multi.GetBlock(1), StructuredGrid)
      multi = vtk.vtkMultiBlockDataSet()
      multi.SetBlock(0, vtk.vtkRectilinearGrid())
      multi.SetBlock(1, vtk.vtkStructuredGrid())
      multi = MultiBlock(multi, deep=True)
      assert isinstance(multi, MultiBlock)
      assert multi.n_blocks == 2
      assert isinstance(multi.GetBlock(0), RectilinearGrid)
      assert isinstance(multi.GetBlock(1), StructuredGrid)
      # Test nested structure
      multi = vtk.vtkMultiBlockDataSet()
      multi.SetBlock(0, vtk.vtkRectilinearGrid())
      multi.SetBlock(1, vtk.vtkImageData())
      nested = vtk.vtkMultiBlockDataSet()
      nested.SetBlock(0, vtk.vtkUnstructuredGrid())
      nested.SetBlock(1, vtk.vtkStructuredGrid())
      multi.SetBlock(2, nested)
      # Wrap the nested structure
      multi = MultiBlock(multi)
      assert isinstance(multi, MultiBlock)
      assert multi.n_blocks == 3
      assert isinstance(multi.GetBlock(0), RectilinearGrid)
      assert isinstance(multi.GetBlock(1), ImageData)
      assert isinstance(multi.GetBlock(2), MultiBlock)
  
imports: import pathlib
  import platform
  import weakref
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista import ImageData, MultiBlock, PolyData, RectilinearGrid, StructuredGrid, examples
label_desc: Use image node_id 2 for calling a global function with example usage: test_multi_block_init_vtk() without return types