code: def text_3d(string, depth=0.5):
      """Create 3D text from a given string.
  
      Parameters
      ----------
      string : str
          The string of text to convert into 3D text.
  
      depth : float, default: 0.5
          The depth of the extrusion used to create the 3D text.
  
      Returns
      -------
      pyvista.DataSet
          The 3D text in the form of a PyVista DataSet.
  
      """
      from vtkmodules.vtkRenderingFreeType import vtkVectorText
  
      vec_text = vtkVectorText()
      vec_text.SetText(string)
  
      extrude = _vtk.vtkLinearExtrusionFilter()
      extrude.SetInputConnection(vec_text.GetOutputPort())
      extrude.SetExtrusionTypeToNormalExtrusion()
      extrude.SetVector(0, 0, 1)
      extrude.SetScaleFactor(depth)
  
      tri_filter = _vtk.vtkTriangleFilter()
      tri_filter.SetInputConnection(extrude.GetOutputPort())
      tri_filter.Update()
      return pyvista.wrap(tri_filter.GetOutput())
  
file_path: pyvista/pyvista/demos/logo.py
imports: import os
  import numpy
  import pyvista
  from pyvista import examples
  from pyvista.core import _vtk_core
label_desc: Use image node_id 2 for calling a global function with example usage: text_3d(string, depth) and returns: pyvista