code: def test_grad_not_all_inputs_outputs_in_graph(xs_indices, ys_indices):
      shape = (1,)
      dtype = chainerx.float32
  
      xs = (
          chainerx.full(shape, 3, dtype).require_grad(),
          chainerx.full(shape, 5, dtype).require_grad(),
      )
      gxs = (
          (
              chainerx.full(shape, 1, dtype),  # gy1gx1
              chainerx.full(shape, 1, dtype),
          ),  # gy1gx2
          (
              chainerx.full(shape, 5, dtype),  # gy2gx1
              chainerx.full(shape, 3, dtype),
          ),
      )  # gy2gx2
      expected_gxs = [None] * len(xs_indices)
  
      for ys_index in ys_indices:
          for i, xs_index in enumerate(xs_indices):
              if expected_gxs[i] is None:
                  expected_gxs[i] = chainerx.full(shape, 0, dtype)
              expected_gxs[i] += gxs[ys_index][xs_index]
  
      def fprop(x0, x1):
          return x0 + x1, x0 * x1
  
      _check_grad(
          fprop,
          xs,
          tuple(expected_gxs),
          xs_indices=xs_indices,
          ys_indices=ys_indices,
      )
  
imports: import chainerx
  import pytest
label_desc: Use image node_id 24 for calling a global function with example usage: test_grad_not_all_inputs_outputs_in_graph(xs_indices, ys_indices) and returns: unknown,  unknown