code: def test_non_existent_enum_value(self):
      class Color(Enum):
          RED = 1
          GREEN = 2
  
      make_global(Color)
  
      def enum_const(x: Color) -> bool:
          if x == Color.PURPLE:
              return True
          else:
              return False
  
      with self.assertRaisesRegexWithHighlight(
          RuntimeError, "has no attribute 'PURPLE'", "Color.PURPLE"
      ):
          torch.jit.script(enum_const)
  
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 8 for calling the TestEnum obj's underlying member method code with example usage: obj.test_non_existent_enum_value() and returns: True, False