code: def test_enum_value(self):
      class Color(Enum):
          RED = 1
          GREEN = 2
  
      make_global(Color)
  
      @torch.jit.script
      def enum_value(x: Color) -> int:
          return x.value
  
      FileCheck().check("Color").check_next(
          "prim::EnumValue"
      ).check_next("return").run(str(enum_value.graph))
  
      self.assertEqual(enum_value(Color.RED), Color.RED.value)
      self.assertEqual(enum_value(Color.GREEN), Color.GREEN.value)
  
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 6 for calling the TestEnum obj's underlying member method code with example usage: obj.test_enum_value() and returns: x