code: def decimal_to_digits(decimal, min_digits=None):
      
      digits = abs(int(np.log10(decimal)))
      if min_digits is not None:
          digits = np.clip(digits, min_digits, 20)
      return digits
docs: Return the number of digits to the first nonzero decimal.
  
      Parameters
      -----------
      decimal:    float
      min_digits: int, minimum number of digits to return
  
      Returns
      -----------
  
      digits: int, number of digits to the first nonzero decimal