code: def fmt(x):
      s = f"{x:.1f}"
      if s.endswith("0"):
          s = f"{x:.0f}"
      return rf"{s} \%" if plt.rcParams["text.usetex"] else f"{s} %"
  
imports: import matplotlib.pyplot
  import numpy
  import matplotlib.ticker
label_desc: Use image node_id 1 for calling a global function with example usage: fmt(x) and returns: unknown