code: def test_namedtuple_py2(self):
      global _GoogLeNetOutputs  # see [local resolution in python]
      _GoogLeNetOutputs = namedtuple(
          "GoogLeNetOutputs", ["logits", "aux_logits2", "aux_logits1"]
      )
  
      @torch.jit.script
      def foo(x):
          # type: (_GoogLeNetOutputs) -> _GoogLeNetOutputs
          return x
  
      vals = torch.rand(3), torch.rand(4), torch.rand(5)
      out = foo(
          _GoogLeNetOutputs(
              logits=vals[0], aux_logits2=vals[1], aux_logits1=vals[2]
          )
      )
      self.assertEqual(out.logits, vals[0])
      self.assertEqual(out.aux_logits2, vals[1])
      self.assertEqual(out.aux_logits1, vals[2])
  
imports: import os
  import sys
  import torch
  from torch.testing._internal.jit_utils import JitTestCase, make_global
  from torch.testing._internal.common_utils import IS_WINDOWS
  from collections import namedtuple
  from typing import List, Tuple, Dict, NamedTuple
label_desc: Use image node_id 37 for calling the TestTyping obj's underlying member method code with example usage: obj.test_namedtuple_py2() and returns: x