code: def test_backprop_multiple_graphs_reuse(method0, method1, method2):
      shape = (1,)
      dtype = chainerx.float32
  
      def fprop(x0, x1):
          return (x0 * x1,)
  
      with chainerx.backprop_scope(
          "bp2"
      ) as backprop_id2, chainerx.backprop_scope("bp1") as backprop_id1:
          xs = (
              chainerx.full(shape, 2, dtype).require_grad(backprop_id1),
              chainerx.full(shape, 5, dtype).require_grad(backprop_id2),
          )
          expected_gxs = (
              chainerx.full(shape, 5, dtype),
              None,
          )
  
          _check_backprop(
              method0, fprop, xs, expected_gxs, backprop_id=backprop_id1
          )
  
          x1, x2 = xs
          x1.cleargrad(backprop_id1)
          x2.cleargrad(backprop_id2)
  
          assert x1.get_grad(backprop_id1) is None
          assert x2.get_grad(backprop_id2) is None
  
          expected_gxs = (
              None,
              chainerx.full(shape, 2, dtype),
          )
  
          _check_backprop(
              method1, fprop, xs, expected_gxs, backprop_id=backprop_id2
          )
  
          x1.cleargrad(backprop_id1)
          x2.cleargrad(backprop_id2)
  
          x1.require_grad(backprop_id2)
          x2.require_grad(backprop_id1)
  
          expected_gxs = (
              chainerx.full(shape, 5, dtype),
              chainerx.full(shape, 2, dtype),
          )
  
          _check_backprop(
              method2, fprop, xs, expected_gxs, backprop_id=backprop_id2
          )
  
          assert x1.get_grad(backprop_id1) is None
          assert x2.get_grad(backprop_id1) is None
  
imports: import chainerx
  import pytest
label_desc: Use image node_id 21 for calling a global function with example usage: test_backprop_multiple_graphs_reuse(method0, method1, method2) and returns: unknown