code: def colored_diff(string_a, string_b):
      """Return a multi-line colored diff of given strings `a` and `b`"""
      string_a = string_a.splitlines(keepends=True)
      string_b = string_b.splitlines(keepends=True)
      result = list(Differ().compare(string_a, string_b))
  
      colored_result = []
      for i, line in enumerate(result):
          line = line.strip("\n")
          if line[0] == "-" or (
              line[0] == "?" and result[i - 1][0] == "-"
          ):
              line = red(line)
          elif line[0] == "+" or (
              line[0] == "?" and result[i - 1][0] == "+"
          ):
              line = green(line)
  
          colored_result.append(line)
  
      return "\n".join(colored_result)
  
imports: from difflib import Differ
label_desc: Use image node_id 4 for calling a global function with example usage: colored_diff(string_a, string_b) and returns: str