def module_docs(self, namespace):
        """
        Return a dict with docstrings for namespace.

        Since a namespace can be implemented in more than one place,
        the path where docstring was found is used as key.
        """
        doc = {
            'ns': namespace, 'name': '',
            'type': 'module',
            'short_desc': '',
            'long_desc': '',
            'modules': self.modules(namespace),
            'actors': self.actors(namespace),
            }
        paths = self.paths_for_module(namespace)
        for path in paths:
            docpath = os.path.join(path, '__init__.py')
            pymodule = self._load_pymodule('__init__', docpath)
            if pymodule and pymodule.__doc__:
                doclines = pymodule.__doc__.splitlines()
                doc['short_desc'] = doclines[0]
                doc['long_desc'] = '\n'.join(doclines[2:])
                break
        if not doc['short_desc'] and not doc['long_desc']:
            doc['short_desc'] = 'No documentation for "%s"' % namespace
        return doc
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/store.py/DocumentationStore.module_docs/original