class_docstr: Test the transform function (validate and dispatch).
docstr: Test that transforms are not created during Sphinx builds
code: def test_sphinx_build(self, monkeypatch):
      """Test that transforms are not created during Sphinx builds"""
      monkeypatch.setenv("SPHINX_BUILD", "1")
  
      with pytest.warns(
          UserWarning,
          match="Transforms have been disabled, as a Sphinx",
      ):
  
          @qml.transforms.core.transform
          def custom_transform(  # pylint:disable=unused-variable
              tape: qml.tape.QuantumTape, index: int
          ) -> (Sequence[qml.tape.QuantumTape], Callable):
              """A valid transform."""
              tape = tape.copy()
              tape._ops.pop(index)  # pylint:disable=protected-access
              return [tape], lambda x: x
  
imports: from typing import Sequence, Callable
  from functools import partial
  import pytest
  import pennylane
  from pennylane.transforms.core import transform, TransformError, TransformContainer
label_desc: Use image node_id 22 for calling the TestTransformDispatcher obj's underlying member method code with example usage: obj.test_sphinx_build(monkeypatch) and returns: list,  function