def change_object_type(obj, new_type):
    """Attempts to change an object (usually a string) to a different object type."""
    if new_type == 'str':
        return str(obj)
    elif new_type == 'int':
        return int(obj)
    elif new_type == 'float':
        return float(obj)
    else:
        raise IOError('expected_type "{}" is not supported in this function.'
            .format(new_type))
