docstr: ### Add ansi color codes
docstr_tok: ["#","#","#","Add","ansi","color","codes"]
code: def __ansi_code(
      text: str, color: List[StyleCode] or StyleCode or None
  ):
      """
      ### Add ansi color codes
      """
      if color is None:
          return text
      elif isinstance(color, list):
          return (
              "".join([c.ansi() for c in color]) + f"{text}{ANSI_RESET}"
          )
      else:
          return f"{color.ansi()}{text}{ANSI_RESET}"
  
file_path: labml/client/labml/internal/logger/destinations/console.py
imports: from typing import List, Union, Tuple, Optional
  from ...app.logs import APP_CONSOLE_LOGS
  from ..destinations import Destination
  from ...util.colors import StyleCode, ANSI_RESET
label_desc: Use image node_id 2 for calling the ConsoleDestination obj's underlying member method code with example usage: obj.__ansi_code(text, color) and returns: text, unknown, color, text, ANSI_RESET