def find_model_path(self, config: dict, key_model: str, path: list = []) -> Generator:
        """
        Find paths to all dictionaries in config that contain key 'key_model'

        Args:
            config: dictionary
            key_model: key of sub-dictionary to be found
            path: list of keys and/or integers (for list) with relative path (needed for recursion)

        Returns:
            path in config -- list of keys (strings and integers)
        """
        config_pointer = config
        if isinstance(config_pointer, dict) and key_model in config_pointer.keys():
            yield path
        else:
            if isinstance(config_pointer, dict):
                for key in list(config_pointer.keys()):
                    for path_ in self.find_model_path(config_pointer[key], key_model, path + [key]):
                        yield path_
            elif isinstance(config_pointer, list):
                for i in range(len(config_pointer)):
                    for path_ in self.find_model_path(config_pointer[i], key_model, path + [i]):
                        yield path_

        Find paths to all dictionaries in config that contain key 'key_model'

        Args:
            config: dictionary
            key_model: key of sub-dictionary to be found
            path: list of keys and/or integers (for list) with relative path (needed for recursion)

        Returns:
            path in config -- list of keys (strings and integers)
        
deeppavlov/core/common/params_search.py