code: def round_sig_fig(x, significant_digits=2) -> float:
      """Round considering of significant figures of x, given the select
      `significant_digits` prototype.
  
      If`significant_digits` match the number of significant figures in `x`, its value
      will be used for rounding; otherwise, decimal places will removed
      accordingly to the significant figures in `x`.
  
      Parameters
      ----------
      x
          A floating point scalar.
      significant_digits
          The number of intended rounding figures.
  
      Returns
      -------
          The rounded value of `x`.
  
      Examples
      --------
      >>> round_sig_fig(1.2345)
      1.2
      >>> round_sig_fig(1.2345, significant_digits=3)
      1.23
      >>> round_sig_fig(0.0)
      0.0
      >>> round_sig_fig(0)
      0
      >>> round_sig_fig(1999, significant_digits=1)
      2000
      >>> round_sig_fig(1999, significant_digits=4)
      1999
      >>> round_sig_fig(0.025, significant_digits=3)
      0.03
      >>> round_sig_fig(0.025, significant_digits=10)
      0.025
      >>> round_sig_fig(0.0250, significant_digits=10)
      0.025
      """
      return round(
          x,
          significant_digits
          - int(math.floor(math.log10(abs(x) + 1)))
          - 1,
      )
  
imports: from __future__ import annotations
  import collections
  import copy
  import dataclasses
  import functools
  import math
  import sys
  import typing
  from river.base.typing import FeatureName
  from river.stats import Cov, Var
label_desc: Use image node_id 4 for calling a global function with example usage: round_sig_fig(x, significant_digits) and returns: round