def _guess_module_name(self, path):
        path = abspath(path)
        base = basename(path)
        if base.endswith('.py'):
            base = base[:-3]
        name = [base]

        def _load_package_name(current, module_name):
            inits = filter(lambda x: x == '__init__.py', listdir(current))
            if inits:
                module_name.append(basename(current))
                return _load_package_name(dirname(current), module_name)
            return module_name, current
        # check if this is in a package
        name, parent_dir = _load_package_name(dirname(path), name)
        name.reverse()
        return ".".join(name), parent_dir
Returns True for Component or PseudoComponent nodes.
dataset/ETHPy150Open thasso/pyjip/jip/tools.py/Scanner._guess_module_name--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/is_comp_node