code: def test_indexed_grads(self) -> None:
      schema = torchgen.model.FunctionSchema.parse(
          "func(Tensor a, Tensor b) -> (Tensor x, Tensor y)"
      )
      native_function = dataclasses.replace(
          DEFAULT_NATIVE_FUNCTION, func=schema
      )
  
      derivative = load_derivatives.create_derivative(
          native_function,
          formula="func_backward(grads[0], grads[1])",
          var_names=(),
          available_named_gradients=["grad_x", "grad_y"],
      )
      self.assertSetEqual(derivative.named_gradients, set())
  
imports: import dataclasses
  import typing
  import unittest
  from collections import defaultdict
  from typing import Dict, List
  import torchgen.model
  import yaml
  from tools.autograd import gen_autograd_functions, load_derivatives
  from torchgen import dest
  from torchgen.api.types import CppSignatureGroup, DispatcherSignature
  from torchgen.context import native_function_manager
  from torchgen.gen import get_native_function_declarations, get_native_function_schema_registrations, LineLoader, static_dispatch
  from torchgen.model import BackendIndex, BackendMetadata, DispatchKey, Location, NativeFunction, OperatorName
  from torchgen.native_function_generation import add_generated_native_functions
  from torchgen.selective_build.selector import SelectiveBuilder
label_desc: Use image node_id 3 for calling the TestCreateDerivative obj's underlying member method code with example usage: obj.test_indexed_grads() without return types