code: def __getattr__(self, attr):
      if attr in self.colors:
          color = self.colors.index(attr) + 31
  
          def color_message(message):
              return "[{}m{}[0m".format(color, message)
  
          setattr(self, attr, color_message)
          return color_message
  
file_path: PaddleDetection/ppdet/utils/cli.py
imports: from argparse import ArgumentParser, RawDescriptionHelpFormatter
  import yaml
  import re
  from ppdet.core.workspace import get_registered_modules, dump_value
label_desc: Use image node_id 2 for calling the ColorTTY obj's underlying member method code with example usage: obj.__getattr__(attr) and returns: color_message, str