def is_module_or_submodule(name, mod_or_submod):
 return (name.startswith((mod_or_submod + '.')) or (name == mod_or_submod))

def is_module_or_submodule ( name , mod_or_submod ) : return ( name . startswith ( ( mod_or_submod + '.' ) ) or ( name == mod_or_submod ) )
this helper function is designed for use in the filter argument of collect_submodules .