code: def round_number_str(number: float) -> str:
      """Round a number to the nearest unit and convert to a string.
  
      Parameters
      ----------
      number : float
          The number to round.
  
      Returns
      -------
      str
          The rounded number as a string.
          If the number is == 0, None is returned.
  
      """
      sign = "-" if number < 0 else ""
      number = abs(number)
      if number > 0.95:
          for unit, scaling in [
              ("T", int(1e12)),  # Trillion
              ("B", int(1e9)),  # Billion
              ("M", int(1e6)),  # Million
              ("k", int(1e3)),  # Thousand
          ]:
              if number / scaling > 0.95:
                  return f"{round(number / scaling)}{unit}"
          return sign + str(round(number))
      if number > 0:  # avoid log10(0)
          # we have a number between 0-0.95 -> round till nearest non-zero digit
          return sign + str(
              round(number, 1 + abs(int(math.log10(number))))
          )
  
file_path: plotly-resampler/plotly_resampler/figure_resampler/utils.py
imports: import math
  import pandas
  from plotly.basedatatypes import BaseFigure
  from typing import Any
label_desc: Use image node_id 7 for calling a global function with example usage: round_number_str(number) and returns: unknown, unknown, round, unit