code: def py2round(value):
      
      if value > 0:
          return float(floor(float(value)+0.5))
      else:
          return float(ceil(float(value)-0.5))
docs: Round values as in Python 2, for Python 3 compatibility.
  
      All x.5 values are rounded away from zero.
  
      In Python 3, this has changed to avoid bias: when x is even,
      rounding is towards zero, when x is odd, rounding is away
      from zero. Thus, in Python 3, round(2.5) results in 2,
      round(3.5) is 4.
  
      Python 3 also returns an int; Python 2 returns a float.