class_docstr: Create an ``Interactions``-like object for data in the HDF5 format that might be too large to
  fit in memory.
  
  Many of the same features of ``Interactions`` are implemented here, with the exception that
  approximate negative sampling will always be used.
  
  Parameters
  ----------
  hdf5_path: str
  user_col: str
      Column in HDF5 file with user IDs. IDs must begin at 0
  item_col: str
      Column in HDF5 file with item IDs. IDs must begin at 0
  num_negative_samples: int
      Number of negative samples to return with each ``__getitem__`` call
  num_users: int
      Number of users in the dataset. If ``num_users == 'infer'`` and there is not a ``meta`` key
      in ``hdf5_path``'s HDF5 dataset, this will be set to the the maximum value in
      ``user_col`` + 1, found by iterating through the entire dataset
  num_items: int
      Number of items in the dataset. If ``num_items == 'infer'`` and there is not an ``meta`` key
      in ``hdf5_path``'s HDF5 dataset, this will be set to the the maximum value in
      ``item_col`` + 1, found by iterating through the entire dataset
  seed: int
      Seed for random sampling and shuffling if ``shuffle is True``
  shuffle: bool
      Shuffle data in a batch. For example, if one calls ``__getitem__`` with
      ``start_idx_and_batch_size = (0, 4)`` and ``shuffle is False``, this will always return the
      data at indices 0, 1, 2, 3 in order. However, the same call with ``shuffle = True`` will
      return a random shuffle of 0, 1, 2, 3 each call. This is recommended for use in a
      ``HDF5InteractionsDataLoader`` for training data in lieu of true data shuffling
class_docstr_tok: ["Create","an","``","Interactions","``","-like","object","for","data","in","the","HDF5","format","that","might","be","too","large","to","fit","in","memory",".","Many","of","the","same","features","of","``","Interactions","``","are","implemented","here",",","with","the","exception","that","approximate","negative","sampling","will","always","be","used",".","Parameters","--","--","--","--","--","hdf5_path",":","str","user_col",":","str","Column","in","HDF5","file","with","user","IDs",".","IDs","must","begin","at","0","item_col",":","str","Column","in","HDF5","file","with","item","IDs",".","IDs","must","begin","at","0","num_negative_samples",":","int","Number","of","negative","samples","to","return","with","each","``","__getitem__","``","call","num_users",":","int","Number","of","users","in","the","dataset",".","If","``","num_users","==","'infer","'","``","and","there","is","not","a","``","meta","``","key","in","``","hdf5_path","``","'s","HDF5","dataset",",","this","will","be","set","to","the","the","maximum","value","in","``","user_col","``","+","1",",","found","by","iterating","through","the","entire","dataset","num_items",":","int","Number","of","items","in","the","dataset",".","If","``","num_items","==","'infer","'","``","and","there","is","not","an","``","meta","``","key","in","``","hdf5_path","``","'s","HDF5","dataset",",","this","will","be","set","to","the","the","maximum","value","in","``","item_col","``","+","1",",","found","by","iterating","through","the","entire","dataset","seed",":","int","Seed","for","random","sampling","and","shuffling","if","``","shuffle","is","True","``","shuffle",":","bool","Shuffle","data","in","a","batch",".","For","example",",","if","one","calls","``","__getitem__","``","with","``","start_idx_and_batch_size","=","(","0",",","4",")","``","and","``","shuffle","is","False","``",",","this","will","always","return","the","data","at","indices","0",",","1",",","2",",","3","in","order",".","However",",","the","same","call","with","``","shuffle","=","True","``","will","return","a","random","shuffle","of","0",",","1",",","2",",","3","each","call",".","This","is","recommended","for","use","in","a","``","HDF5InteractionsDataLoader","``","for","training","data","in","lieu","of","true","data","shuffling"]
docstr: Get number of batches.
docstr_tok: ["Get","number","of","batches","."]
code: def __len__(self) -> int:
      """Get number of batches."""
      return self.num_interactions
  
imports: from abc import ABCMeta, abstractmethod
  import collections
  import random
  import textwrap
  from typing import Any, Iterable, List, Optional, Tuple, Union
  import warnings
  import numpy
  import pandas
  from scipy.sparse import coo_matrix, dok_matrix
  import torch
  from tqdm.auto import tqdm
  import collie
label_desc: Use image node_id 4 for calling the HDF5Interactions obj's underlying member method code with example usage: obj.__len__() and returns: self