code: def test_format_dict(styler):
      ctx = styler.format({"A": "{:0.1f}", "B": "{0:.2%}"})._translate(
          True, True
      )
      assert ctx["body"][0][1]["display_value"] == "0.0"
      assert ctx["body"][0][2]["display_value"] == "-60.90%"
  
imports: import numpy
  import pytest
  from pandas import NA, DataFrame, IndexSlice, MultiIndex, NaT, Timestamp, option_context
  from pandas.io.formats.style import Styler
  from pandas.io.formats.style_render import _str_escape
label_desc: Use image node_id 7 for calling a global function with example usage: test_format_dict(styler) without return types