class_docstr: Training set contains history sessions
  
  Parameters
  ----------
  num_users: int, required
      Number of users.
  
  num_items: int, required
      Number of items.
  
  uid_map: :obj:`OrderDict`, required
      The dictionary containing mapping from user original ids to mapped integer indices.
  
  iid_map: :obj:`OrderDict`, required
      The dictionary containing mapping from item original ids to mapped integer indices.
  
  uir_tuple: tuple, required
      Tuple of 3 numpy arrays (user_indices, item_indices, rating_values).
  
  session_ids: numpy.array, required
      Array of session indices corresponding to observation in `uir_tuple`.
  
  timestamps: numpy.array, optional, default: None
      Numpy array of timestamps corresponding to feedback in `uir_tuple`.
      This is only available when input data is in `SIT`, `USIT`, SITJson`, and `USITJson` formats.
  
  extra_data: numpy.array, optional, default: None
      Array of json object corresponding to observations in `uir_tuple`.
  
  seed: int, optional, default: None
      Random seed for reproducing data sampling.
  
  Attributes
  ----------
  timestamps: numpy.array
      Numpy array of timestamps corresponding to feedback in `ubi_tuple`.
      This is only available when input data is in `UTB` format.
class_docstr_tok: ["Training","set","contains","history","sessions","Parameters","--","--","--","--","--","num_users",":","int",",","required","Number","of","users",".","num_items",":","int",",","required","Number","of","items",".","uid_map",":",":","obj",":","`","OrderDict","`",",","required","The","dictionary","containing","mapping","from","user","original","ids","to","mapped","integer","indices",".","iid_map",":",":","obj",":","`","OrderDict","`",",","required","The","dictionary","containing","mapping","from","item","original","ids","to","mapped","integer","indices",".","uir_tuple",":","tuple",",","required","Tuple","of","3","numpy","arrays","(","user_indices",",","item_indices",",","rating_values",")",".","session_ids",":","numpy.array",",","required","Array","of","session","indices","corresponding","to","observation","in","`","uir_tuple","`",".","timestamps",":","numpy.array",",","optional",",","default",":","None","Numpy","array","of","timestamps","corresponding","to","feedback","in","`","uir_tuple","`",".","This","is","only","available","when","input","data","is","in","`","SIT","`",",","`","USIT","`",",","SITJson","`",",","and","`","USITJson","`","formats",".","extra_data",":","numpy.array",",","optional",",","default",":","None","Array","of","json","object","corresponding","to","observations","in","`","uir_tuple","`",".","seed",":","int",",","optional",",","default",":","None","Random","seed","for","reproducing","data","sampling",".","Attributes","--","--","--","--","--","timestamps",":","numpy.array","Numpy","array","of","timestamps","corresponding","to","feedback","in","`","ubi_tuple","`",".","This","is","only","available","when","input","data","is","in","`","UTB","`","format","."]
code: def __init__(
      self,
      num_users,
      num_sessions,
      num_items,
      uid_map,
      sid_map,
      iid_map,
      uir_tuple,
      session_indices=None,
      timestamps=None,
      extra_data=None,
      seed=None,
  ):
      super().__init__(
          num_users=num_users,
          num_items=num_items,
          uid_map=uid_map,
          iid_map=iid_map,
          uir_tuple=uir_tuple,
          timestamps=timestamps,
          seed=seed,
      )
      self.num_sessions = num_sessions
      self.sid_map = sid_map
      self.session_indices = session_indices
      self.extra_data = extra_data
      session_sizes = list(Counter(session_indices).values())
      self.max_session_size = np.max(session_sizes)
      self.min_session_size = np.min(session_sizes)
      self.avg_session_size = np.mean(session_sizes)
  
      self.__sessions = None
      self.__session_ids = None
      self.__user_session_data = None
      self.__chrono_user_session_data = None
  
imports: import copy
  import os
  import pickle
  import warnings
  from collections import Counter, OrderedDict, defaultdict
  import numpy
  from scipy.sparse import csc_matrix, csr_matrix, dok_matrix
  from ..utils import estimate_batches, get_rng, validate_format
label_desc: Use image node_id 1 to create a new SequentialDataset object from inherited base classes: Dataset with example: obj = SequentialDataset(num_users, num_sessions, num_items, uid_map, sid_map, iid_map, uir_tuple, session_indices, timestamps, extra_data, seed)