def closest_half_integer(number):

    """
    Round a number to the closest half integer.
    >>> closest_half_integer(1.3)
    1.5
    >>> closest_half_integer(2.6)
    2.5
    >>> closest_half_integer(3.0)
    3.0
    >>> closest_half_integer(4.1)
    4.0
    """

    return round(number * 2) / 2.0