code: def test_terminal_colors(self):
      logger = TerminalLogger()
      real_is_color_supported = logs.is_color_supported
  
      logs.is_color_supported = lambda: False
      red_color = logger.colors["red"]
      self.assertEqual("test", red_color("test"))
  
      logs.is_color_supported = lambda: True
      self.assertNotEqual("test", red_color("test"))
      self.assertIn("test", red_color("test"))
  
      logs.is_color_supported = real_is_color_supported
  
file_path: neupy/tests/core/test_logging.py
imports: from __future__ import unicode_literals
  from collections import namedtuple
  from neupy.core import logs
  from neupy.core.logs import Verbose, TerminalLogger
  from base import BaseTestCase
  from helpers import catch_stdout
label_desc: Use image node_id 4 for calling the LoggingTestCase obj's underlying member method code with example usage: obj.test_terminal_colors() without return types