docstr: Splits protein-ligand pairs in PDBbind into train/validation/test in time order.
  
  Parameters
  ----------
  dataset: Dataset
      Dataset to be split.
  frac_train: float, optional (default 0.8)
      The fraction of data to be used for the training split.
  frac_valid: float, optional (default 0.1)
      The fraction of data to be used for the validation split.
  frac_test: float, optional (default 0.1)
      The fraction of data to be used for the test split.
  seed: int, optional (default None)
      Random seed to use.
  log_every_n: int, optional (default None)
      Log every n examples (not currently used).
  
  Returns
  -------
  Tuple[List[int], List[int], List[int]]
      A tuple of train indices, valid indices, and test indices.
      Each indices is a list of integers.
docstr_tok: ["Splits","protein-ligand","pairs","in","PDBbind","into","train\/validation\/test","in","time","order",".","Parameters","--","--","--","--","--","dataset",":","Dataset","Dataset","to","be","split",".","frac_train",":","float",",","optional","(","default","0.8",")","The","fraction","of","data","to","be","used","for","the","training","split",".","frac_valid",":","float",",","optional","(","default","0.1",")","The","fraction","of","data","to","be","used","for","the","validation","split",".","frac_test",":","float",",","optional","(","default","0.1",")","The","fraction","of","data","to","be","used","for","the","test","split",".","seed",":","int",",","optional","(","default","None",")","Random","seed","to","use",".","log_every_n",":","int",",","optional","(","default","None",")","Log","every","n","examples","(","not","currently","used",")",".","Returns","--","--","--","-","Tuple","[","List","[","int","]",",","List","[","int","]",",","List","[","int","]","]","A","tuple","of","train","indices",",","valid","indices",",","and","test","indices",".","Each","indices","is","a","list","of","integers","."]
code: def split(
      self,
      dataset: Dataset,
      frac_train: float = 0.8,
      frac_valid: float = 0.1,
      frac_test: float = 0.1,
      seed: Optional[int] = None,
      log_every_n: Optional[int] = None,
  ) -> Tuple[List[int], List[int], List[int]]:
      """
      Splits protein-ligand pairs in PDBbind into train/validation/test in time order.
  
      Parameters
      ----------
      dataset: Dataset
          Dataset to be split.
      frac_train: float, optional (default 0.8)
          The fraction of data to be used for the training split.
      frac_valid: float, optional (default 0.1)
          The fraction of data to be used for the validation split.
      frac_test: float, optional (default 0.1)
          The fraction of data to be used for the test split.
      seed: int, optional (default None)
          Random seed to use.
      log_every_n: int, optional (default None)
          Log every n examples (not currently used).
  
      Returns
      -------
      Tuple[List[int], List[int], List[int]]
          A tuple of train indices, valid indices, and test indices.
          Each indices is a list of integers.
      """
      if self.year_file is None:
          try:
              data_dir = os.environ["DEEPCHEM_DATA_DIR"]
              self.year_file = os.path.join(
                  data_dir, "pdbbind_year.csv"
              )
              if not os.path.exists(self.year_file):
                  dc.utils.download_url(
                      "http://deepchem.io.s3-website-us-west-1.amazonaws.com/datasets/pdbbind_year.csv",
                      dest_dir=data_dir,
                  )
          except:
              raise ValueError(
                  "Time description file should be specified"
              )
      df = pd.read_csv(self.year_file, header=None)
      self.years = {}
      for i in range(df.shape[0]):
          self.years[df[0][i]] = int(df[1][i])
      np.testing.assert_almost_equal(
          frac_train + frac_valid + frac_test, 1.0
      )
      num_datapoints = len(dataset)
      assert len(self.ids) == num_datapoints
      train_cutoff = int(frac_train * num_datapoints)
      valid_cutoff = int((frac_train + frac_valid) * num_datapoints)
      indices = range(num_datapoints)
      data_year = [self.years[self.ids[i]] for i in indices]
      new_indices = [
          pair[0]
          for pair in sorted(
              zip(indices, data_year), key=lambda x: x[1]
          )
      ]
  
      return (
          new_indices[:train_cutoff],
          new_indices[train_cutoff:valid_cutoff],
          new_indices[valid_cutoff:],
      )
  
imports: import inspect
  import itertools
  import logging
  import os
  import random
  import tempfile
  from typing import Any, Dict, Iterator, List, Optional, Sequence, Tuple, Union
  import deepchem
  import numpy
  import pandas
  from deepchem.data import Dataset, DiskDataset
  from deepchem.utils import get_print_threshold
label_desc: Use image node_id 2 for calling the TimeSplitterPDBbind obj's underlying member method code with example usage: obj.split(dataset, frac_train, frac_valid, frac_test, seed, log_every_n) and returns: new_indices,  new_indices,  new_indices