def check_dependencies(dependencies, module):
if type(dependencies) == str:<EOL><INDENT>dependencies = [dependencies]<EOL><DEDENT>elif type(dependencies) != list:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>for dependency in dependencies:<EOL><INDENT>if dependency not in settings.INSTALLED_APPS:<EOL><INDENT>raise DependencyError('<STR_LIT>' % (module, dependency))<EOL><DEDENT><DEDENT>
Ensure dependencies of a module are listed in settings.INSTALLED_APPS

:dependencies string | list: list of dependencies to check
:module string: string representing the path to the current app