class_docstr: Handles loading/featurizing of data from disk.
  
  The main use of `DataLoader` and its child classes is to make it
  easier to load large datasets into `Dataset` objects.`
  
  `DataLoader` is an abstract superclass that provides a
  general framework for loading data into DeepChem. This class should
  never be instantiated directly.  To load your own type of data, make
  a subclass of `DataLoader` and provide your own implementation for
  the `create_dataset()` method.
  
  To construct a `Dataset` from input data, first instantiate a
  concrete data loader (that is, an object which is an instance of a
  subclass of `DataLoader`) with a given `Featurizer` object. Then
  call the data loader's `create_dataset()` method on a list of input
  files that hold the source data to process. Note that each subclass
  of `DataLoader` is specialized to handle one type of input data so
  you will have to pick the loader class suitable for your input data
  type.
  
  Note that it isn't necessary to use a data loader to process input
  data. You can directly use `Featurizer` objects to featurize
  provided input into numpy arrays, but note that this calculation
  will be performed in memory, so you will have to write generators
  that walk the source files and write featurized data to disk
  yourself. `DataLoader` and its subclasses make this process easier
  for you by performing this work under the hood.
class_docstr_tok: ["Handles","loading\/featurizing","of","data","from","disk",".","The","main","use","of","`","DataLoader","`","and","its","child","classes","is","to","make","it","easier","to","load","large","datasets","into","`","Dataset","`","objects.","`","`","DataLoader","`","is","an","abstract","superclass","that","provides","a","general","framework","for","loading","data","into","DeepChem",".","This","class","should","never","be","instantiated","directly",".","To","load","your","own","type","of","data",",","make","a","subclass","of","`","DataLoader","`","and","provide","your","own","implementation","for","the","`","create_dataset","(",")","`","method",".","To","construct","a","`","Dataset","`","from","input","data",",","first","instantiate","a","concrete","data","loader","(","that","is",",","an","object","which","is","an","instance","of","a","subclass","of","`","DataLoader","`",")","with","a","given","`","Featurizer","`","object",".","Then","call","the","data","loader","'s","`","create_dataset","(",")","`","method","on","a","list","of","input","files","that","hold","the","source","data","to","process",".","Note","that","each","subclass","of","`","DataLoader","`","is","specialized","to","handle","one","type","of","input","data","so","you","will","have","to","pick","the","loader","class","suitable","for","your","input","data","type",".","Note","that","it","is","n't","necessary","to","use","a","data","loader","to","process","input","data",".","You","can","directly","use","`","Featurizer","`","objects","to","featurize","provided","input","into","numpy","arrays",",","but","note","that","this","calculation","will","be","performed","in","memory",",","so","you","will","have","to","write","generators","that","walk","the","source","files","and","write","featurized","data","to","disk","yourself",".","`","DataLoader","`","and","its","subclasses","make","this","process","easier","for","you","by","performing","this","work","under","the","hood","."]
docstr: Featurizes a shard of input data.
  
  Recall a shard is a chunk of input data that can reasonably be
  handled in memory. For example, this may be a set of rows from a
  CSV file or a set of molecules from a SDF file. Featurize this
  shard in memory and return the results.
  
  Parameters
  ----------
  shard: Any
      A chunk of input data
docstr_tok: ["Featurizes","a","shard","of","input","data",".","Recall","a","shard","is","a","chunk","of","input","data","that","can","reasonably","be","handled","in","memory",".","For","example",",","this","may","be","a","set","of","rows","from","a","CSV","file","or","a","set","of","molecules","from","a","SDF","file",".","Featurize","this","shard","in","memory","and","return","the","results",".","Parameters","--","--","--","--","--","shard",":","Any","A","chunk","of","input","data"]
code: def _featurize_shard(self, shard: Any):
      """Featurizes a shard of input data.
  
      Recall a shard is a chunk of input data that can reasonably be
      handled in memory. For example, this may be a set of rows from a
      CSV file or a set of molecules from a SDF file. Featurize this
      shard in memory and return the results.
  
      Parameters
      ----------
      shard: Any
          A chunk of input data
      """
      raise NotImplementedError
  
imports: import os
  import tempfile
  import zipfile
  import time
  import logging
  import warnings
  from typing import List, Optional, Tuple, Any, Sequence, Union, Iterator
  import pandas
  import numpy
  from deepchem.utils.typing import OneOrMany
  from deepchem.utils.data_utils import load_image_files, load_csv_files, load_json_files, load_sdf_files, unzip_file
  from deepchem.feat import UserDefinedFeaturizer, Featurizer
  from deepchem.data import Dataset, DiskDataset, NumpyDataset, ImageDataset
  from deepchem.feat.molecule_featurizers import OneHotFeaturizer
  from deepchem.utils.genomics_utils import encode_bio_sequence
label_desc: Use image node_id 5 for calling the DataLoader obj's underlying member method code with example usage: obj._featurize_shard(shard) without return types