pipeline.py: add recursive depending on item_type