code: def test_await_nested(self):
      class C:
          def __init__(self, a: Tensor, b: Tensor):
              self.__a = a
              self.__b = b
  
          def a(self) -> Tensor:
              return self.__a
  
      make_global(C)
  
      def delayed(c: C) -> Await[Tensor]:
          return torch.jit._awaitable_nowait(3 * c.a())
  
      def fn(x: Tensor) -> Await[Await[Tensor]]:
          return torch.jit._awaitable(delayed, C(2 * x, x))
  
      def main(x: Tensor) -> Tensor:
          awaw = fn(x)
          return torch.jit._awaitable_wait(
              torch.jit._awaitable_wait(awaw)
          )
  
      inp = torch.eye(2)
  
      sm = torch.jit.script(main)
      out = main(inp)
      script_out = sm(inp)
      self.assertTrue(torch.allclose(6 * torch.eye(2), script_out))
      self.assertTrue(torch.allclose(script_out, out))
  
imports: import io
  import torch
  from torch.testing._internal.jit_utils import JitTestCase
  from torch.testing._internal.jit_utils import make_global
  from typing import List, Optional, Tuple
  from torch import Tensor
  from torch._awaits import _Await
label_desc: Use image node_id 10 for calling the TestAwait obj's underlying member method code with example usage: obj.test_await_nested() and returns: torch, torch, torch, self