code: def _round_frac(x, precision: int):
      """
      Round the fractional part of the given number
      """
      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)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, Callable, Literal
  import numpy
  from pandas._libs import Timedelta, Timestamp, lib
  from pandas.core.dtypes.common import ensure_platform_int, is_bool_dtype, is_integer, is_list_like, is_numeric_dtype, is_scalar
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype
  from pandas.core.dtypes.generic import ABCSeries
  from pandas.core.dtypes.missing import isna
  from pandas import Categorical, Index, IntervalIndex
  import pandas.core.algorithms
  from pandas.core.arrays.datetimelike import dtype_to_unit
label_desc: Use image node_id 10 for calling a global function with example usage: _round_frac(x, precision) and returns: x, np