code: def roundFunc(tolerance, round=otRound):
      if tolerance < 0:
          raise ValueError("Rounding tolerance must be positive")
  
      if tolerance == 0:
          return noRound
  
      if tolerance >= 0.5:
          return round
  
      return functools.partial(
          maybeRound, tolerance=tolerance, round=round
      )
  
file_path: catboost/contrib/python/fonttools/fontTools/misc/roundTools.py
imports: import math
  import functools
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: roundFunc(tolerance, round) and returns: functools, noRound, round