class_docstr: Defines a dataset composed of Examples along with its Fields.
  
  Attributes:
      sort_key (callable): A key to use for sorting dataset examples for batching
          together examples with similar lengths to minimize padding.
      examples (list(Example)): The examples in this dataset.
      fields (dict[str, Field]): Contains the name of each column or field, together
          with the corresponding Field object. Two fields with the same Field object
          will have a shared vocabulary.
docstr: Create a dataset from a list of Examples and Fields.
  
  Arguments:
      examples: List of Examples.
      fields (List(tuple(str, Field))): The Fields to use in this tuple. The
          string is a field name, and the Field is the associated field.
      filter_pred (callable or None): Use only examples for which
          filter_pred(example) is True, or use all examples if None.
          Default is None.
docstr_tok: ["Create","a","dataset","from","a","list","of","Examples","and","Fields",".","Arguments",":","examples",":","List","of","Examples",".","fields","(","List","(","tuple","(","str",",","Field",")",")",")",":","The","Fields","to","use","in","this","tuple",".","The","string","is","a","field","name",",","and","the","Field","is","the","associated","field",".","filter_pred","(","callable","or","None",")",":","Use","only","examples","for","which","filter_pred","(","example",")","is","True",",","or","use","all","examples","if","None",".","Default","is","None","."]
code: def __init__(self, examples, fields, filter_pred=None):
      """Create a dataset from a list of Examples and Fields.
  
      Arguments:
          examples: List of Examples.
          fields (List(tuple(str, Field))): The Fields to use in this tuple. The
              string is a field name, and the Field is the associated field.
          filter_pred (callable or None): Use only examples for which
              filter_pred(example) is True, or use all examples if None.
              Default is None.
      """
      if filter_pred is not None:
          make_list = isinstance(examples, list)
          examples = filter(filter_pred, examples)
          if make_list:
              examples = list(examples)
      self.examples = examples
      self.fields = dict(fields)
      # Unpack field tuples
      for n, f in list(self.fields.items()):
          if isinstance(n, tuple):
              self.fields.update(zip(n, f))
              del self.fields[n]
  
imports: import csv
  import gzip
  import io
  import os
  import shutil
  import tarfile
  import zipfile
  from functools import partial
  import torch.utils.data
  from torchtext.data.utils import RandomShuffler
  from torchtext.utils import download_from_url
  from .example import Example
label_desc: Use image node_id 1 to create a new Dataset object from inherited base classes: torch.utils.data with example: obj = Dataset(examples, fields, filter_pred)