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: import plotly.graph_objs
  import numpy
  from plotly import subplots
  import matplotlib.pyplot
  from numbers import Number
  import logging
label_desc: Use image node_id 5 for calling a global function with example usage: _human_format(num) and returns: str