code: def test_backprop_multiple_graphs_non_existing(method):
      shape = (1,)
      dtype = chainerx.float32
  
      with chainerx.backprop_scope(
          "bp1"
      ) as backprop_id1, chainerx.backprop_scope("bp2") as backprop_id2:
          xs = (
              chainerx.full(shape, 2, dtype).require_grad(backprop_id1),
              chainerx.full(shape, 5, dtype).require_grad(backprop_id1),
          )
  
          y = xs[0] * xs[1]
  
          if method == "backward":
              chainerx.backward(y, backprop_id2)
              assert xs[0].get_grad(backprop_id1) is None
              assert xs[1].get_grad(backprop_id1) is None
          elif method == "grad":
              grads = chainerx.grad([y], xs, backprop_id2)
              assert len(grads) == 2
              assert grads[0] is None
              assert grads[1] is None
          else:
              assert False
  
          with pytest.raises(chainerx.ChainerxError):
              xs[0].get_grad(backprop_id2)
          with pytest.raises(chainerx.ChainerxError):
              xs[1].get_grad(backprop_id2)
  
imports: import chainerx
  import pytest
label_desc: Use image node_id 20 for calling a global function with example usage: test_backprop_multiple_graphs_non_existing(method) without return types