# test handling of failed heap allocation with setimportmicropython# create setx=1micropython.heap_lock()try:{x}exceptMemoryError:print("MemoryError: set create")micropython.heap_unlock()# set copys={1,2}micropython.heap_lock()try:s.copy()exceptMemoryError:print("MemoryError: set copy")micropython.heap_unlock()