def METHOD_NAME(obj):
    if not obj.is_object():
        raise MakeError('TypeError', 'Object.freeze called on non-object')
    for desc in obj.own.values():
        desc['configurable'] = False
        if is_data_descriptor(desc):
            desc['writable'] = False
    obj.extensible = False
    return obj