def roundt(value, places=0):
    """
    Simple rounding utility function that performs the currently
    selected rounding operation on the provided value and then
    re-casts the resulting value back to the original data type.

    This function is relevant/useful for situation where the base
    value inherits indirectly from the float class.

    @type value: float
    @param value: The value that is meant to be rounded and then
    "casted" back to the original data type.
    @param places: The number of decimal places to be used
    in the rounding operation.
    @rtype: float
    @return: The resulting rounded value according to the
    default rounding strategy defined.
    """
    value_t = type(value)
    result = round(value, places)
    return result if type(result) == value_t else value_t(result)
