def _get_chapters_paths(self) -> list:

    def _recursive_process_chapters(chapters_subset):
        if isinstance(chapters_subset, dict):
            processed_chapters_subset = {}
            for (key, value) in chapters_subset.items():
                processed_chapters_subset[key] = _recursive_process_chapters(value)
        elif isinstance(chapters_subset, list):
            processed_chapters_subset = []
            for item in chapters_subset:
                processed_chapters_subset.append(_recursive_process_chapters(item))
        elif isinstance(chapters_subset, str):
            if chapters_subset.endswith('.md'):
                chapters_paths.append((self.working_dir / chapters_subset))
            processed_chapters_subset = chapters_subset
        else:
            processed_chapters_subset = chapters_subset
        return processed_chapters_subset
    chapters_paths = []
    _recursive_process_chapters(self.config['chapters'])
    self.logger.debug(f'Chapters files paths: {chapters_paths}')
    return chapters_paths
def _get_chapters_paths(self) -> list:

    def _recursive_process_chapters(chapters_subset):
        if isinstance(chapters_subset, dict):
            processed_chapters_subset = {}
            for (key, value) in chapters_subset.items():
                processed_chapters_subset[key] = _recursive_process_chapters(value)
        elif isinstance(chapters_subset, list):
            processed_chapters_subset = []
            for item in chapters_subset:
                processed_chapters_subset.append(_recursive_process_chapters(item))
        elif isinstance(chapters_subset, str):
            if chapters_subset.endswith('.md'):
                chapters_paths.append((self.working_dir / chapters_subset))
            processed_chapters_subset = chapters_subset
        else:
            processed_chapters_subset = chapters_subset
        return processed_chapters_subset
    chapters_paths = []
    _recursive_process_chapters(self.config['chapters'])
    self.logger.debug(f'Chapters files paths: {chapters_paths}')
    return chapters_paths