def METHOD_NAME(obj, properties):
    if not obj.is_object():
        raise MakeError('TypeError',
                        'Object.defineProperties called on non-object')
    props = properties.to_object()
    for name in props:
        desc = ToPropertyDescriptor(props.get(name.value))
        if not obj.define_own_property(name.value, desc):
            raise MakeError(
                'TypeError',
                'Failed to define own property: %s' % name.value)
    return obj