code: def _format(self, text, code=None, ext=None):
      val = None
      if ext:
          val = self._extensions.get(ext, None)
      if code:
          val = self._codes.get(code, None)
  
      if not val:
          return text
      rs = self._codes.get("rs", 0)
      return f"\033[{val}m{text}\033[{rs}m"
  
imports: import os
label_desc: Use image node_id 4 for calling the LsColors obj's underlying member method code with example usage: obj._format(text, code, ext) and returns: str, val, str, text, str, rs, str, text