in tools/registry.py [0:0]
def contains(self, module_name, version=None):
"""
Check if the registry contains a module or a specific version of a
module by verifying if the directory exists.
"""
dir_path = self.root.joinpath("modules", module_name)
if version:
dir_path = dir_path.joinpath(version)
return dir_path.is_dir()