def METHOD_NAME(timestamp):
    before = floor_timestamp(timestamp)
    after = ceil_timestamp(timestamp)
    if (timestamp - before) < (after - timestamp):
        return before
    else:
        return after