code: def test_user_theme():
      class MyTheme(Theme):
          def __init__(self):
              """Initialize the theme."""
              super().__init__()
              self.background = "lightgrey"
              self.color = "#1f77b4"
  
              self.lighting_params.interpolation = "Phong"
              self.lighting_params.ambient = 0.15
              self.lighting_params.diffuse = 0.45
              self.lighting_params.specular = 0.85
              self.lighting_params.roughness = 0.25  # PBR
              self.lighting_params.metallic = 0.35  # PBR
  
              self.smooth_shading = True
              self.render_lines_as_tubes = True
              self.line_width = 8
              self.point_size = 9
  
      theme = MyTheme()
      sphere = pv.Sphere()
      lines = sphere.extract_all_edges()
      points = pv.PolyData(sphere.points)
      try:
          pv.set_plot_theme(theme)
  
          pl = pv.Plotter()
          assert pl.background_color == theme.background
          sactor = pl.add_mesh(sphere)
          assert sactor.prop.color == theme.color
          assert (
              sactor.prop.interpolation.value
              == theme.lighting_params.interpolation
          )
          assert sactor.prop.ambient == theme.lighting_params.ambient
          assert sactor.prop.diffuse == theme.lighting_params.diffuse
          assert sactor.prop.specular == theme.lighting_params.specular
  
          lactor = pl.add_mesh(lines)
          assert (
              lactor.prop.render_lines_as_tubes
              == theme.render_lines_as_tubes
          )
          assert lactor.prop.line_width == theme.line_width
  
          pactor = pl.add_mesh(points)
          assert pactor.prop.point_size == theme.point_size
  
          pl = pv.Plotter()
          sactor = pl.add_mesh(sphere, pbr=True)
          assert (
              sactor.prop.roughness == theme.lighting_params.roughness
          )
          assert sactor.prop.metallic == theme.lighting_params.metallic
  
      finally:
          # always return to testing theme
          pv.set_plot_theme("testing")
  
imports: import os
  import pytest
  import vtk
  import pyvista
  from pyvista import colors
  from pyvista.examples.downloads import download_file
  from pyvista.plotting.themes import DarkTheme, Theme, _set_plot_theme_from_env
  from pyvista.plotting.utilities.gl_checks import uses_egl
label_desc: Use image node_id 54 for calling a global function with example usage: test_user_theme() without return types