code: def get_sentences_with_idcs(
      sentences: pd.DataFrame, sentences_idcs: Set[int]
  ):
      """Given a set of sentence indices, returns the corresponding sentences texts in sentences."""
      criterion = sentences["sentence_index"].map(
          lambda x: x in sentences_idcs
      )
      return sentences[criterion]["sentence"].tolist()
  
imports: import os
  from typing import List, Optional, Set
  import pandas
  from ludwig.datasets.dataset_config import DatasetConfig
  from ludwig.datasets.loaders.dataset_loader import DatasetLoader
label_desc: Use image node_id 5 for calling a global function with example usage: get_sentences_with_idcs(sentences, sentences_idcs) and returns: sentences