code: def compute_digit_number(value):
      """
      return int, number of digits to display
  
      Parameters
      ----------
      value : float
          can be the gap between percentiles
  
      Returns
      -------
      int
          number of digits
      """
      # fix for 0 value
      if value == 0:
          first_nz = 1
      else:
          first_nz = int(math.log10(abs(value)))
      digit = abs(min(3, first_nz) - 3)
      return digit
  
file_path: shapash/shapash/utils/utils.py
imports: import numpy
  import pandas
  import socket
  import math
  from shapash.explainer.smart_state import SmartState
  from shapash.explainer.multi_decorator import MultiDecorator
label_desc: Use image node_id 7 for calling a global function with example usage: compute_digit_number(value) and returns: digit