def __getitem__(self, video_settings):
        """Return surface rendered with given settings.

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

        ### try returning the value for the tuple we
        ### just obtained, which, if existent, should
        ### be a surface rendered with the corresponding
        ### settings
        try:
            return super().__getitem__(tuple_key)

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

        except KeyError:

            return self.setdefault(
                tuple_key,
                render_video_data(
                    self.video_path, VIDEO_METADATA_MAP, **video_settings
                ),
            )
Return surface rendered with given settings.

        Parameters
        ==========
        video_settings (dict)
            contains settings defining how the video must
            be rendered;
        
nodezator/videopreview/cache.py