Rond au 0.5 le plus proche

def custom_round(x, base=0.5):
    return base * round(float(x)/base)

# you can replace the base parameter with the nearest rounding you need 
    
Thankful Toad