def __getitem__(self, text_settings):
        """Return dict with maps related to text settings.

        If the maps for the specific given text settings
        don't exist yet, they are created before being
        returned.

        Parameters
        ==========
        text_settings (dict)
            contains settings defining how the text must
            be rendered;
        """
        ### convert the text settings (a dict) to a custom
        ### tuple representing them, to use as dictionary key
        tuple_key = settings_to_hashable_repr(text_settings)

        ### try returning the value for the tuple we
        ### just obtained
        try:
            return super().__getitem__(tuple_key)

        ### if such value doesn't exist (a key error is
        ### raised), we create the corresponding data,
        ### and return it while at the same time creating
        ### a new item using the tuple key

        except KeyError:

            surf_map = TextSurfaceMap(text_settings)

            return self.setdefault(
                tuple_key, {"surf_map": surf_map, "width_map": surf_map.width_map}
            )
Return dict with maps related to text settings.

        If the maps for the specific given text settings
        don't exist yet, they are created before being
        returned.

        Parameters
        ==========
        text_settings (dict)
            contains settings defining how the text must
            be rendered;
        
nodezator/textman/cache.py