code: def test_color_word():
      s = "word"
      green_s = "\033[1;32mword\033[0m"
      for enabled in (True, False):
          with patch(
              "datalad.support.ansi_colors.color_enabled",
              lambda: enabled,
          ):
              assert_equal(
                  colors.color_word(s, colors.GREEN, force=True),
                  green_s,
              )
  
      with patch(
          "datalad.support.ansi_colors.color_enabled", lambda: True
      ):
          assert_equal(colors.color_word(s, colors.GREEN), green_s)
          assert_equal(
              colors.color_word(s, colors.GREEN, force=False), green_s
          )
  
      with patch(
          "datalad.support.ansi_colors.color_enabled", lambda: False
      ):
          assert_equal(colors.color_word(s, colors.GREEN), s)
          assert_equal(
              colors.color_word(s, colors.GREEN, force=False), s
          )
  
imports: import os
  from unittest.mock import patch
  from datalad.support import ansi_colors
  from datalad.tests.utils_pytest import assert_equal, patch_config
label_desc: Use image node_id 3 for calling a global function with example usage: test_color_word() without return types