code: def test_non_differentiable_output_output_differentiability(
      self,
  ) -> None:
      specification = (
          "func(Tensor a, Tensor b) -> (Tensor x, Tensor y, Tensor z)"
      )
      schema = torchgen.model.FunctionSchema.parse(specification)
      native_function = dataclasses.replace(
          DEFAULT_NATIVE_FUNCTION, func=schema
      )
  
      (
          _,
          differentiability_info,
      ) = load_derivatives.create_differentiability_info(
          defn_dict={
              "name": specification,
              "dispatch": {
                  "Default": {
                      "a": "grad_x",
                      "b": "grad_z",
                  },
                  "AutogradNestedTensor": {
                      "a": "grad_z",
                      "b": "grad_x",
                  },
              },
              "output_differentiability": [True, False, True],
          },
          functions_by_signature={
              schema.signature(): [native_function]
          },
          functions_by_schema={specification: native_function},
          op_counter=typing.Counter[str](),
          used_dispatch_keys=set(),
      )
      default_definition = gen_autograd_functions.process_function(
          differentiability_info["Default"],
          gen_autograd_functions.FUNCTION_DEFINITION,
      )
      # grad_z should map to grads[1], not grads[2] because output 1
      # (y) is not differentiable.
      assert "grad_z = grads[2]" not in default_definition
      assert "grad_z = grads[1]" in default_definition
  
      nested_tensor_definition = (
          gen_autograd_functions.process_function(
              differentiability_info["AutogradNestedTensor"],
              gen_autograd_functions.FUNCTION_DEFINITION,
          )
      )
      assert "grad_z = grads[2]" not in nested_tensor_definition
      assert "grad_z = grads[1]" in nested_tensor_definition
  
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 2 for calling the TestGenAutogradFunctions obj's underlying member method code with example usage: obj.test_non_differentiable_output_output_differentiability() without return types