code: def test_theme_slots(default_theme):
      # verify we can't create an arbitrary attribute
      with pytest.raises(AttributeError, match="has no attribute"):
          default_theme.new_attr = 1
  
      # verify we can't create an arbitrary attribute on an attribute
      assert default_theme.lighting_params
      with pytest.raises(AttributeError, match="has no attribute"):
          default_theme.lighting_params.new_attr = 1
  
      # subclasses should also prevent arbitrary attributes
      theme = DarkTheme()
      with pytest.raises(AttributeError, match="has no attribute"):
          theme.new_attr = 1
  
      assert theme.lighting_params
      with pytest.raises(AttributeError, match="has no attribute"):
          theme.lighting_params.new_attr = 1
  
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 41 for calling a global function with example usage: test_theme_slots(default_theme) without return types