<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _find_dependent_modules(self, module):
 """ Return the set of dependent modules for used modules, classes and routines. """

        dms = set()
        for um in inspect.getmembers(module, inspect.ismodule):
            dms.add(um[1])

        for uc in inspect.getmembers(module, inspect.isclass):
            self._add_obj_module(dms, uc[1])
        for ur in inspect.getmembers(module, inspect.isroutine):
            self._add_obj_module(dms, ur[1])

        return dms