class_docstr: A light wrapper around a ``torch.utils.data.DataLoader`` for ``Interactions``-type datasets.
  
  For implicit data, batches will be created one-point-at-a-time using exact negative sampling
  (unless configured not to in ``interactions``), which is optimal when datasets are smaller
  (< 1M+ interactions) and model training speed is not a concern. This is the default
  ``DataLoader`` for ``Interactions`` datasets.
  
  For explicit data, negative sampling is not used, but batches will still be created
  one-point-at-a-time.
  
  Parameters
  ----------
  interactions: BaseInteractions
      If not provided, an ``Interactions`` object will be created with ``mat`` or all of
      ``users``, ``items``, and ``ratings``
  mat: scipy.sparse.coo_matrix or numpy.array, 2-dimensional
      If ``interactions is None``, will be used instead of ``users``, ``items``, and ``ratings``
      arguments to create an ``Interactions`` object
  users: Iterable[int], 1-d
      If ``interactions is None and mat is None``, array of user IDs, starting at 0
  items: Iterable[int], 1-d
      If ``interactions is None and mat is None``, array of corresponding item IDs to ``users``,
      starting at 0
  ratings: Iterable[int], 1-d
      If ``interactions is None and mat is None``, array of corresponding ratings to both
      ``users`` and ``items``. If ``None``, will default to each user in ``user`` interacting with
      an item with a rating value of 1
  batch_size: int
      Number of samples per batch to load
  shuffle: bool
      Whether to shuffle the order of data returned or not. This is especially useful for training
      data to ensure the model does not overfit to a specific order of data
  **kwargs: keyword arguments
      Relevant keyword arguments will be passed into ``Interactions`` object creation, if
      ``interactions is None`` and the keyword argument matches one of
      ``Interactions.__init__.__code__.co_varnames``. All other keyword arguments will be passed
      into ``torch.utils.data.DataLoader``:
      https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader
  
  Attributes
  ----------
  interactions: Interactions (default) or ExplicitInteractions
  
  Original ``torch.utils.data.DataLoader`` docstring as follows:
  ########
class_docstr_tok: ["A","light","wrapper","around","a","``","torch.utils.data.DataLoader","``","for","``","Interactions","``","-type","datasets",".","For","implicit","data",",","batches","will","be","created","one-point-at-a-time","using","exact","negative","sampling","(","unless","configured","not","to","in","``","interactions","``",")",",","which","is","optimal","when","datasets","are","smaller","(","<","1M+","interactions",")","and","model","training","speed","is","not","a","concern",".","This","is","the","default","``","DataLoader","``","for","``","Interactions","``","datasets",".","For","explicit","data",",","negative","sampling","is","not","used",",","but","batches","will","still","be","created","one-point-at-a-time",".","Parameters","--","--","--","--","--","interactions",":","BaseInteractions","If","not","provided",",","an","``","Interactions","``","object","will","be","created","with","``","mat","``","or","all","of","``","users","``",",","``","items","``",",","and","``","ratings","``","mat",":","scipy.sparse.coo_matrix","or","numpy.array",",","2-dimensional","If","``","interactions","is","None","``",",","will","be","used","instead","of","``","users","``",",","``","items","``",",","and","``","ratings","``","arguments","to","create","an","``","Interactions","``","object","users",":","Iterable","[","int","]",",","1-d","If","``","interactions","is","None","and","mat","is","None","``",",","array","of","user","IDs",",","starting","at","0","items",":","Iterable","[","int","]",",","1-d","If","``","interactions","is","None","and","mat","is","None","``",",","array","of","corresponding","item","IDs","to","``","users","``",",","starting","at","0","ratings",":","Iterable","[","int","]",",","1-d","If","``","interactions","is","None","and","mat","is","None","``",",","array","of","corresponding","ratings","to","both","``","users","``","and","``","items","``",".","If","``","None","``",",","will","default","to","each","user","in","``","user","``","interacting","with","an","item","with","a","rating","value","of","1","batch_size",":","int","Number","of","samples","per","batch","to","load","shuffle",":","bool","Whether","to","shuffle","the","order","of","data","returned","or","not",".","This","is","especially","useful","for","training","data","to","ensure","the","model","does","not","overfit","to","a","specific","order","of","data","*","*","kwargs",":","keyword","arguments","Relevant","keyword","arguments","will","be","passed","into","``","Interactions","``","object","creation",",","if","``","interactions","is","None","``","and","the","keyword","argument","matches","one","of","``","Interactions.__init__.__code__.co_varnames","``",".","All","other","keyword","arguments","will","be","passed","into","``","torch.utils.data.DataLoader","``",":","https",":","\/\/pytorch.org\/docs\/stable\/data.html","#","torch.utils.data.DataLoader","Attributes","--","--","--","--","--","interactions",":","Interactions","(","default",")","or","ExplicitInteractions","Original","``","torch.utils.data.DataLoader","``","docstring","as","follows",":","#","#","#","#","#","#","#","#"]
docstr: String representation of ``InteractionsDataLoader`` class.
docstr_tok: ["String","representation","of","``","InteractionsDataLoader","``","class","."]
code: def __repr__(self) -> str:
      """String representation of ``InteractionsDataLoader`` class."""
      if hasattr(self.interactions, "num_negative_samples"):
          extra_repr_str = f"{self.num_negative_samples} negative samples per implicit interaction in"
      else:
          extra_repr_str = "explicit,"
  
      return (
          textwrap.dedent(
              f"""
              InteractionsDataLoader object with {self.num_interactions} interactions between
              {self.num_users} users and {self.num_items} items, returning
              {extra_repr_str}
              {'shuffled' if self.shuffle else 'non-shuffled'} batches of size {self.batch_size}.
              """
          )
          .replace("\n", " ")
          .strip()
      )
  
imports: import textwrap
  from typing import Iterable, Optional, Union
  import numpy
  from scipy.sparse import coo_matrix
  import torch
  from collie.interactions.datasets import BaseInteractions, ExplicitInteractions, HDF5Interactions, Interactions
  from collie.interactions.samplers import ApproximateNegativeSampler, HDF5Sampler
label_desc: Use image node_id 2 for calling the InteractionsDataLoader obj's underlying member method code with example usage: obj.__repr__() and returns: textwrap