code: def human_format(num):
      num = float("{:.3g}".format(num))
      magnitude = 0
      while abs(num) >= 1000:
          magnitude += 1
          num /= 1000.0
      return "{}{}".format(
          "{:f}".format(num).rstrip("0").rstrip("."),
          ["", "K", "M", "B", "T"][magnitude],
      )
  
imports: from __future__ import annotations
  import itertools
  from functools import partial
  from typing import Dict, List
  import dill
  import numpy
  import plotly.graph_objects
  from plotly.subplots import make_subplots
  import plotly.express
  from ..analyzer.analyzer import *
label_desc: Use image node_id 1 for calling a global function with example usage: human_format(num) and returns: str