To produce the error:
import grimp
graph = grimp.build_graph("nifty_library", include_external_packages=True)
graph.find_modules_that_directly_import('yaml')
This results in this error:
----> 1 graph.find_modules_that_directly_import('yaml')
File ~/.virtualenvs/kraken-core/lib/python3.10/site-packages/grimp/adaptors/graph.py:234, in ImportGraph.find_modules_that_directly_import(self, module)
233 def find_modules_that_directly_import(self, module: str) -> Set[str]:
--> 234 return self._importers_by_imported[module]
KeyError: 'yaml'