code: def mpf_round_int(s, rnd):
      sign, man, exp, bc = s
      if (not man) and exp:
          return s
      if exp >= 0:
          return s
      mag = exp + bc
      if mag < 1:
          if rnd == round_ceiling:
              if sign:
                  return fzero
              else:
                  return fone
          elif rnd == round_floor:
              if sign:
                  return fnone
              else:
                  return fzero
          elif rnd == round_nearest:
              if mag < 0 or man == MPZ_ONE:
                  return fzero
              elif sign:
                  return fnone
              else:
                  return fone
          else:
              raise NotImplementedError
      return mpf_pos(s, min(bc, mag), rnd)
  
imports: import math
  from bisect import bisect
  import sys
  from .backend import MPZ, MPZ_TYPE, MPZ_ZERO, MPZ_ONE, MPZ_TWO, MPZ_FIVE, BACKEND, STRICT, HASH_MODULUS, HASH_BITS, gmpy, sage, sage_utils
  from .libintmath import giant_steps, trailtable, bctable, lshift, rshift, bitcount, trailing, sqrt_fixed, numeral, isqrt, isqrt_fast, sqrtrem, bin_to_radix
label_desc: Use image node_id 14 for calling a global function with example usage: mpf_round_int(s, rnd) and returns: mpf_pos, s, s, fzero, fone, fnone, fzero, fzero, fnone, fone