code: def test_highlight_colors(self):
      eq = self.assertEqual
      cc = self.cc
  
      orig_colors = dict(self.highlight_cfg)
      test_colors = {"background": "#222222", "foreground": "#ffff00"}
  
      def assert_colors_are_equal(colors):
          eq(cc.context["background"], colors["background"])
          eq(cc.context["foreground"], colors["foreground"])
  
      # Ensure code context is not active.
      if cc.context:
          cc.toggle_code_context_event()
  
      self.highlight_cfg = test_colors
      # Nothing breaks with inactive code context.
      cc.update_highlight_colors()
  
      # Activate code context, previous colors change is immediately effective.
      cc.toggle_code_context_event()
      assert_colors_are_equal(test_colors)
  
      # Call colors update with no change to the configured colors.
      cc.update_highlight_colors()
      assert_colors_are_equal(test_colors)
  
      # Call the colors update with code context active, change is picked up.
      self.highlight_cfg = orig_colors
      cc.update_highlight_colors()
      assert_colors_are_equal(orig_colors)
  
imports: from idlelib import codecontext
  import unittest
  import unittest.mock
  from test.support import requires
  from tkinter import NSEW, Tk, Frame, Text, TclError
  from unittest import mock
  import re
  from idlelib import config
label_desc: Use image node_id 15 for calling the CodeContextTest obj's underlying member method code with example usage: obj.test_highlight_colors() without return types