def __init__()

in src/local_gpu_verifier/src/verifier/rim/__init__.py [0:0]


    def __init__(self, rim_name, settings, rim_path = '', content = ''):
        """ The constructor method for the RIM class handling all the RIM file processing.

        Args:
            rim_name (str): the name of the RIM, can be either "driver" or "vbios"
            settings (config.HopperSettings): the object containing various config.
            rim_path (str): the path to the RIM file
            content (str): the content of the RIM file as a string.
        Raises:
            InvalidRIMNameError: it is raised if the rim_path is invalid.
        """
        assert type(rim_path) is str
        assert type(rim_name) is str

        if rim_name != 'driver' and rim_name != 'vbios':
            raise InvalidRIMNameError(f"Invalid rim name '{rim_name}' provided, valid names can be 'driver'/'vbios'.")

        self.rim_name = rim_name
        if content == '':
            self.root = RIM.read(base_RIM_path = rim_path)
        else:
            self.root = RIM.read(content = content)

        if rim_name == 'driver':
            settings.mark_driver_rim_fetched()
        else:
            settings.mark_vbios_rim_fetched()

        self.colloquialVersion = self.get_colloquial_version()
        self.parse_measurements(settings)