class_docstr: An abstract class for extracting subset of examples.
class_docstr_tok: ["An","abstract","class","for","extracting","subset","of","examples","."]
docstr: Extract a subset of samples.
  
  :param dataset: Dataset
  :param list fields: field str list
  :param kwargs:
  :return: Subset Dataset
docstr_tok: ["Extract","a","subset","of","samples",".",":","param","dataset",":","Dataset",":","param","list","fields",":","field","str","list",":","param","kwargs",":",":","return",":","Subset","Dataset"]
code: def slice_population(self, dataset, fields, **kwargs):
      r"""
      Extract a subset of samples.
  
      :param dataset: Dataset
      :param list fields: field str list
      :param kwargs:
      :return: Subset Dataset
  
      """
  
      scores = []
      for sample in tqdm(dataset):
          scores.append(self.score(sample, fields))
      sub_samples = self.get_slice(scores, dataset)
      new_dataset = dataset.new_dataset()
      new_dataset.extend(sub_samples)
      return new_dataset
  
file_path: textflint/textflint/generation/subpopulation/subpopulation.py
imports: import math
  from tqdm import tqdm
  from abc import ABC, abstractmethod
  from ...common.preprocess import EnProcessor
label_desc: Use image node_id 6 for calling the SubPopulation obj's underlying member method code with example usage: obj.slice_population(dataset, fields) and returns: new_dataset