code: def color_word(
      s: str, color: Optional[int], force: bool = False
  ) -> str:
      """Color `s` with `color`.
  
      Parameters
      ----------
      s : string
      color : int
          Code for color. If the value evaluates to false, the string will not be
          colored.
      force : boolean, optional
          Color string even when non-interactive session is detected.
  
      Returns
      -------
      str
      """
      if color and (force or color_enabled()):
          return "%s%s%s" % (COLOR_SEQ % color, s, RESET_SEQ)
      return s
  
file_path: datalad/datalad/support/ansi_colors.py
imports: from __future__ import annotations
  import os
  from typing import Optional
  from ..None import cfg
  from ..ui import ui
label_desc: Use image node_id 3 for calling a global function with example usage: color_word(s, color, force) and returns: s, unknown