code: def test_info(self):
      choices = color_choices
  
      class Example(HasTraits):
          enum1 = Enum(choices, allow_none=False)
          enum2 = CaselessStrEnum(choices, allow_none=False)
          enum3 = FuzzyEnum(choices, allow_none=False)
          enum4 = UseEnum(CSColor, allow_none=False)
  
      for i in range(1, 5):
          attr = "enum%s" % i
          enum = getattr(Example, attr)
  
          enum.allow_none = True
  
          info = enum.info()
          self.assertEqual(
              len(info.split(", ")), len(choices), info.split(", ")
          )
          self.assertIn("or None", info)
  
          info = enum.info_rst()
          self.assertEqual(
              len(info.split("|")), len(choices), info.split("|")
          )
          self.assertIn("or `None`", info)
          # Check no single `\` exists.
          self.assertNotRegex(info, r"\b\\\b")
  
          enum.allow_none = False
  
          info = enum.info()
          self.assertEqual(
              len(info.split(", ")), len(choices), info.split(", ")
          )
          self.assertNotIn("None", info)
  
          info = enum.info_rst()
          self.assertEqual(
              len(info.split("|")), len(choices), info.split("|")
          )
          self.assertNotIn("None", info)
          # Check no single `\` exists.
          self.assertNotRegex(info, r"\b\\\b")
  
imports: import enum
  import unittest
  from traitlets import CaselessStrEnum, Enum, FuzzyEnum, HasTraits, TraitError, UseEnum
label_desc: Use image node_id 18 for calling the TestUseEnum obj's underlying member method code with example usage: obj.test_info() without return types