Modular design patterns for hybrid learning and reasoning systems