code: def test_replace():
      spheres = {
          f"{i}": pv.Sphere(phi_resolution=i + 3) for i in range(10)
      }
      multi = MultiBlock(spheres)
      cube = pv.Cube()
      multi.replace(3, cube)
      assert multi.get_block_name(3) == "3"
      assert multi[3] is cube
  
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 8 for calling a global function with example usage: test_replace() without return types