code: def test_format_using_callable():
      # test using callable by slightly incrementing above label example
  
      def show_three_decimal_places(value):
          return f"{value:.3f}"
  
      s = Sankey(
          flows=[0.25],
          labels=["First"],
          orientations=[-1],
          format=show_three_decimal_places,
      )
  
      assert s.diagrams[0].texts[0].get_text() == "First\n0.250"
  
file_path: matplotlib/lib/matplotlib/tests/test_sankey.py
imports: import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from matplotlib.sankey import Sankey
  from matplotlib.testing.decorators import check_figures_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_format_using_callable() and returns: value