code: def test_simple_annotated_heatmap(self):
      # we should be able to create a heatmap with annotated values with a
      # logical text color
  
      z = [[1, 0, 0.5], [0.25, 0.75, 0.45]]
      a_heat = ff.create_annotated_heatmap(z)
      expected_a_heat = {
          "data": [
              {
                  "colorscale": [
                      [0.0, "#0d0887"],
                      [0.1111111111111111, "#46039f"],
                      [0.2222222222222222, "#7201a8"],
                      [0.3333333333333333, "#9c179e"],
                      [0.4444444444444444, "#bd3786"],
                      [0.5555555555555556, "#d8576b"],
                      [0.6666666666666666, "#ed7953"],
                      [0.7777777777777778, "#fb9f3a"],
                      [0.8888888888888888, "#fdca26"],
                      [1.0, "#f0f921"],
                  ],
                  "showscale": False,
                  "reversescale": False,
                  "type": "heatmap",
                  "z": [[1, 0, 0.5], [0.25, 0.75, 0.45]],
              }
          ],
          "layout": {
              "annotations": [
                  {
                      "font": {"color": "#000000"},
                      "showarrow": False,
                      "text": "1",
                      "x": 0,
                      "xref": "x",
                      "y": 0,
                      "yref": "y",
                  },
                  {
                      "font": {"color": "#FFFFFF"},
                      "showarrow": False,
                      "text": "0",
                      "x": 1,
                      "xref": "x",
                      "y": 0,
                      "yref": "y",
                  },
                  {
                      "font": {"color": "#000000"},
                      "showarrow": False,
                      "text": "0.5",
                      "x": 2,
                      "xref": "x",
                      "y": 0,
                      "yref": "y",
                  },
                  {
                      "font": {"color": "#FFFFFF"},
                      "showarrow": False,
                      "text": "0.25",
                      "x": 0,
                      "xref": "x",
                      "y": 1,
                      "yref": "y",
                  },
                  {
                      "font": {"color": "#000000"},
                      "showarrow": False,
                      "text": "0.75",
                      "x": 1,
                      "xref": "x",
                      "y": 1,
                      "yref": "y",
                  },
                  {
                      "font": {"color": "#FFFFFF"},
                      "showarrow": False,
                      "text": "0.45",
                      "x": 2,
                      "xref": "x",
                      "y": 1,
                      "yref": "y",
                  },
              ],
              "xaxis": {
                  "gridcolor": "rgb(0, 0, 0)",
                  "showticklabels": False,
                  "side": "top",
                  "ticks": "",
              },
              "yaxis": {
                  "showticklabels": False,
                  "ticks": "",
                  "ticksuffix": "  ",
              },
          },
      }
  
      self.assert_fig_equal(
          a_heat["data"][0], expected_a_heat["data"][0]
      )
  
      self.assert_fig_equal(a_heat["layout"], expected_a_heat["layout"])
  
imports: import math
  from unittest import TestCase
  import datetime
  import plotly.figure_factory
  import plotly.io
  from plotly.exceptions import PlotlyError
  from plotly.tests.test_optional.optional_utils import NumpyTestUtilsMixin
  from plotly.graph_objs import graph_objs
  from plotly.tests.utils import TestCaseNoTemplate
label_desc: Use image node_id 4 for calling the TestAnnotatedHeatmap obj's underlying member method code with example usage: obj.test_simple_annotated_heatmap() without return types