def __init__(
        self,
        filenames: List[_Path],
        open_fn: Callable[[dict], dict],
        label_fn: Callable[[_Path], Any],
        features_key: str = "features",
        target_key: str = "targets",
        **list_dataset_params
    ):
        """
        Args:
            filenames: list of file paths that store information
                about your dataset samples; it could be images, texts or
                any other files in general.
            open_fn: function, that can open your
                annotations dict and
                transfer it to data, needed by your network
                (for example open image by path, or tokenize read string)
            label_fn: function, that can extract target
                value from sample path
                (for example, your sample could be an image file like
                ``/path/to/your/image_1.png`` where the target is encoded as
                a part of file path)
            features_key: key to use to store sample features
            target_key: key to use to store target label
            list_dataset_params: base class initialization
                parameters.
        """
        list_data = [
            {features_key: filename, target_key: label_fn(filename)}
            for filename in filenames
        ]

        super().__init__(list_data=list_data, open_fn=open_fn, **list_dataset_params)

        Args:
            filenames: list of file paths that store information
                about your dataset samples; it could be images, texts or
                any other files in general.
            open_fn: function, that can open your
                annotations dict and
                transfer it to data, needed by your network
                (for example open image by path, or tokenize read string)
            label_fn: function, that can extract target
                value from sample path
                (for example, your sample could be an image file like
                ``/path/to/your/image_1.png`` where the target is encoded as
                a part of file path)
            features_key: key to use to store sample features
            target_key: key to use to store target label
            list_dataset_params: base class initialization
                parameters.
        
catalyst/contrib/data/dataset.py