code: def _round_frac(x, precision):
      
      if not np.isfinite(x) or x == 0:
          return x
      else:
          frac, whole = np.modf(x)
          if whole == 0:
              digits = -int(np.floor(np.log10(abs(frac)))) - 1 + precision
          else:
              digits = precision
          return np.around(x, digits)
docs: Round the fractional part of the given number