code: def format_number(value: Any) -> Tuple[str, int]:
      """
      Args:
          value (Any): A number.
  
      Returns:
          str, int: Format string; Divisor -- value should be divided by this before formatting.
  
      """
      order = 0
      div = 1
      avalue = abs(round(value, 6))
      if avalue == 0 or (isinstance(value, int) and avalue < 1000):
          sig = 0
      elif avalue < 1:
          sig = ceil(log10(1 / avalue)) + 2
      else:
          sig = 2
      if avalue >= 1000:
          order = int(floor(log10(avalue) // 3))
          div = 10 ** (abs(order) * 3)
      suffixes = ["", "k", "m", "b", "t"]
      suffix = suffixes[min(order, len(suffixes) - 1)]
      fmt = "{:" + f",.{sig}f" + "}" + suffix
      return fmt, div
  
file_path: tslumen/tslumen/jinja_utils.py
imports: from math import ceil, log10, floor
  from typing import List, Optional, Any, Tuple
  from datetime import datetime
  import re
  import numpy
  import pandas
  import jinja2
label_desc: Use image node_id 2 for calling a global function with example usage: format_number(value) and returns: fmt,  div