docstr: We handle string, list and dicts in datafiles
docstr_tok: ["We","handle","string",",","list","and","dicts","in","datafiles"]
code: def _split_generators(self, dl_manager):
      """We handle string, list and dicts in datafiles"""
      if not self.config.data_files:
          raise ValueError(
              f"At least one data file must be specified, but got data_files={self.config.data_files}"
          )
      data_files = dl_manager.download_and_extract(
          self.config.data_files
      )
      if isinstance(data_files, (str, list, tuple)):
          files = data_files
          if isinstance(files, str):
              files = [files]
          # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
          files = [dl_manager.iter_files(file) for file in files]
          return [
              datasets.SplitGenerator(
                  name=datasets.Split.TRAIN, gen_kwargs={"files": files}
              )
          ]
      splits = []
      for split_name, files in data_files.items():
          if isinstance(files, str):
              files = [files]
          # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
          files = [dl_manager.iter_files(file) for file in files]
          # Infer features if they are stored in the arrow schema
          if self.info.features is None:
              for file in itertools.chain.from_iterable(files):
                  with open(file, "rb") as f:
                      self.info.features = (
                          datasets.Features.from_arrow_schema(
                              pq.read_schema(f)
                          )
                      )
                  break
          splits.append(
              datasets.SplitGenerator(
                  name=split_name, gen_kwargs={"files": files}
              )
          )
      if self.config.columns is not None and set(
          self.config.columns
      ) != set(self.info.features):
          self.info.features = datasets.Features(
              {
                  col: feat
                  for col, feat in self.info.features.items()
                  if col in self.config.columns
              }
          )
      return splits
  
file_path: datasets/src/datasets/packaged_modules/parquet/parquet.py
imports: import itertools
  from dataclasses import dataclass
  from typing import List, Optional
  import pyarrow
  import pyarrow.parquet
  import datasets
  from datasets.table import table_cast
label_desc: Use image node_id 2 for calling the Parquet obj's underlying member method code with example usage: obj._split_generators(dl_manager) and returns: splits, list