code: def test_enum_value_types(self):
      class IntEnum(Enum):
          FOO = 1
          BAR = 2
  
      class FloatEnum(Enum):
          FOO = 1.2
          BAR = 2.3
  
      class StringEnum(Enum):
          FOO = "foo as in foo bar"
          BAR = "bar as in foo bar"
  
      make_global(IntEnum, FloatEnum, StringEnum)
  
      @torch.jit.script
      def supported_enum_types(a: IntEnum, b: FloatEnum, c: StringEnum):
          return (a.name, b.name, c.name)
  
      FileCheck().check("IntEnum").check("FloatEnum").check(
          "StringEnum"
      ).run(str(supported_enum_types.graph))
  
      class TensorEnum(Enum):
          FOO = torch.tensor(0)
          BAR = torch.tensor(1)
  
      make_global(TensorEnum)
  
      def unsupported_enum_types(a: TensorEnum):
          return a.name
  
      # TODO: rewrite code so that the highlight is not empty.
      with self.assertRaisesRegexWithHighlight(
          RuntimeError,
          "Cannot create Enum with value type 'Tensor'",
          "",
      ):
          torch.jit.script(unsupported_enum_types)
  
imports: import os
  import sys
  import torch
  from torch.testing import FileCheck
  from enum import Enum
  from typing import Any, List
  from torch.testing._internal.jit_utils import JitTestCase, make_global
label_desc: Use image node_id 1 for calling the TestEnum obj's underlying member method code with example usage: obj.test_enum_value_types() and returns: a,  b,  c, a