code: def get_size_str(
      x,
      sig_figs=2,
      input_unit="B",
      output_unit="dynamic",
      show_unit=True,
  ) -> str:
      """
      Convert a small input unit such as bytes to human readable format.
  
      Args:
          x: input value
          sig_figs: number of significant figures
          input_unit: input unit ("B", "KB", "MB", "GB", "TB"), default "B"
          output_unit: output unit ("B", "KB", "MB", "GB", "TB", "dynamic")
              default "dynamic"
          show_unit: whether to show the unit in the output string
  
      Returns:
          str: Human readable string
      """
  
      names = ["B", "KB", "MB", "GB", "TB"]
      names = names[names.index(input_unit) :]
  
      act_i = 0
      if output_unit == "dynamic":
          while x >= 1024 and act_i < len(names) - 1:
              x /= 1024
              act_i += 1
      else:
          target = names.index(output_unit)
          while act_i < target:
              x /= 1024
              act_i += 1
  
      ret_str = f"{str(round(x, sig_figs))}"
      if show_unit:
          ret_str += f" {names[act_i]}"
  
      return ret_str
  
file_path: h2o-llmstudio/llm_studio/src/utils/export_utils.py
imports: import json
  import logging
  import os
  import zipfile
  from typing import Optional
  from llm_studio.src.utils.exceptions import LLMResourceException
  from llm_studio.src.utils.utils import add_file_to_zip
label_desc: Use image node_id 8 for calling a global function with example usage: get_size_str(x, sig_figs, input_unit, output_unit, show_unit) and returns: ret_str