def __init__(self, messages: ImportErrorMessages, fail: bool = False):
        """
        Create an optional imports context manager class. Will keep module not
        found or import errors quiet inside context unless fail is True.
        """

        self.messages = messages
        self.importing = False
        self.fail = fail
        self.imp = builtins.__import__

        Create an optional imports context manager class. Will keep module not
        found or import errors quiet inside context unless fail is True.
        
src/core/trulens/core/utils/imports.py