code: def test_to_polydata(multiblock_all):
      if pv.vtk_version_info >= (9, 1, 0):
          multiblock_all.append(
              pv.PointSet([0.0, 0.0, 1.0])
          )  # missing pointset
      assert not multiblock_all.is_all_polydata
  
      dataset_a = multiblock_all.as_polydata_blocks()
      if pv.vtk_version_info >= (9, 1, 0):
          assert dataset_a[-1].n_points == 1
      assert not multiblock_all.is_all_polydata
      assert dataset_a.is_all_polydata
  
      # verify nested works
      nested_mblock = pv.MultiBlock([multiblock_all, multiblock_all])
      assert not nested_mblock.is_all_polydata
      dataset_b = nested_mblock.as_polydata_blocks()
      assert dataset_b.is_all_polydata
  
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 39 for calling a global function with example usage: test_to_polydata(multiblock_all) without return types