The error message
cannot unpack non-iterable NoneType object
means None was returned by my_map (which doesn't appear anywhere) and the "filter_images" function was supposed to return and unpack two objects (tdf, selected)
So my_map doesn't exist,
map1_selected isn't used
map1 isn't defined, but maybe not selected.
In short, you will need to backtrack and figure out what wasn't found that returned None
... sort of retired...