def _requirements_of_trulens_core_file(
    path: str,
) -> Dict[str, requirements.Requirement]:
    """Get a dictionary of package names to requirements from a requirements
    file in trulens.core."""
    _trulens_resources = importlib_resources.files("trulens.core")
    with importlib_resources.as_file(_trulens_resources / path) as _path:
        with open(_path) as fh:
            reqs = pkg_resources.parse_requirements(fh)

            mapping = {}

            for req in reqs:
                mapping[req.name] = req

            return mapping
Get a dictionary of package names to requirements from a requirements
    file in trulens.core.
src/core/trulens/core/utils/imports.py