code: def test_graph_replace_disconnected(self):
      x = MyVariable("x")
      fake = MyOp("fake")(x)
      o = MyOp("o")(x)
      oc = graph_replace([o], {fake: x.clone()}, strict=False)
      assert oc[0] is o
      with pytest.raises(
          ValueError, match="Some replacements were not used"
      ):
          oc = graph_replace([o], {fake: x.clone()}, strict=True)
  
imports: import numpy
  import pytest
  import scipy.special
  import pytensor.tensor
  from pytensor import config, function, shared
  from pytensor.graph.basic import equal_computations, graph_inputs
  from pytensor.graph.replace import clone_replace, graph_replace, vectorize_graph, vectorize_node
  from pytensor.tensor import dvector, fvector, vector
  from tests import unittest_tools
  from tests.graph.utils import MyOp, MyVariable, op_multiple_outputs
label_desc: Use image node_id 4 for calling the TestGraphReplace obj's underlying member method code with example usage: obj.test_graph_replace_disconnected() without return types