code: def is_close_to_int(x):
      
      if not np.isfinite(x):
          return False
      return abs(x - nearest_int(x)) < 1e-10
docs: Check if value is close to an integer
  
      Parameters
      ----------
      x : float
          Numeric value to check
  
      Returns
      -------
      out : bool