code: def glyphs(grid_sz=3):
      """Create several parametric supertoroids using VTK's glyph table functionality.
  
      Parameters
      ----------
      grid_sz : int, default: 3
          Create ``grid_sz x grid_sz`` supertoroids.
  
      Returns
      -------
      pyvista.PolyData
          Mesh of supertoroids.
  
      See Also
      --------
      plot_glyphs
  
      Examples
      --------
      >>> from pyvista import demos
      >>> mesh = demos.glyphs()
      >>> mesh.plot()
  
      """
      n = 10
      values = np.arange(n)  # values for scalars to look up glyphs by
  
      # taken from:
      rng = np.random.default_rng()
      params = rng.uniform(
          0.5, 2, size=(n, 2)
      )  # (n1, n2) parameters for the toroids
  
      geoms = [
          pyvista.ParametricSuperToroid(n1=n1, n2=n2)
          for n1, n2 in params
      ]
  
      # get dataset where to put glyphs
      grid_sz = float(grid_sz)
      x, y, z = np.mgrid[:grid_sz, :grid_sz, :grid_sz]
      mesh = pyvista.StructuredGrid(x, y, z)
  
      # add random scalars
      rng_int = rng.integers(0, n, size=x.size)
      mesh.point_data["scalars"] = rng_int
  
      # construct the glyphs on top of the mesh; don't scale by scalars now
      return mesh.glyph(
          geom=geoms,
          indices=values,
          scale=False,
          factor=0.3,
          rng=(0, n - 1),
          orient=False,
      )
  
file_path: pyvista/pyvista/demos/demos.py
imports: import time
  import numpy
  import pyvista
  from pyvista import examples
  from .logo import text_3d
label_desc: Use image node_id 1 for calling a global function with example usage: glyphs(grid_sz) and returns: mesh