class_docstr: Helper for en.wikipedia.org/wiki/ANSI_escape_code
code: def _format(cls, s: str, code: str) -> str:
      if os.environ.get("NO_COLOR"):
          # See https://no-color.org/
          return s
      return f"{code}{s}{cls._reset}"
  
file_path: hub-client/src/huggingface_hub/commands/_cli_utils.py
imports: import os
  from typing import List, Union
label_desc: Use image node_id 4 for calling the ANSI obj's underlying member method code with example usage: obj._format(cls, s, code) and returns: code, s, cls, s