code: def test_instantiate_data_loaders(
      ratings_matrix_for_interactions,
      sparse_ratings_matrix_for_interactions,
      df_for_interactions,
      data_loader_class,
  ):
      interactions_kwargs = {
          "num_negative_samples": 4,
      }
      common_data_loader_kwargs = {
          "batch_size": 5,
          "shuffle": False,
          "drop_last": False,
      }
  
      data_loader_class_1 = data_loader_class(
          mat=ratings_matrix_for_interactions,
          **interactions_kwargs,
          **common_data_loader_kwargs,
      )
      data_loader_class_2 = data_loader_class(
          users=df_for_interactions["user_id"],
          items=df_for_interactions["item_id"],
          ratings=df_for_interactions["ratings"],
          **interactions_kwargs,
          **common_data_loader_kwargs,
      )
      data_loader_class_3 = data_loader_class(
          interactions=data_loader_class_1.interactions,
          **common_data_loader_kwargs,
      )
  
      np.testing.assert_equal(
          data_loader_class_1.interactions.toarray(),
          data_loader_class_2.interactions.toarray(),
      )
      np.testing.assert_equal(
          data_loader_class_2.interactions.toarray(),
          data_loader_class_3.interactions.toarray(),
      )
  
      assert (
          data_loader_class_1.interactions.num_users
          == data_loader_class_2.interactions.num_users
          == data_loader_class_3.interactions.num_users
          == data_loader_class_1.num_users
          == data_loader_class_2.num_users
          == data_loader_class_3.num_users
      )
      assert (
          data_loader_class_1.interactions.num_items
          == data_loader_class_2.interactions.num_items
          == data_loader_class_3.interactions.num_items
          == data_loader_class_1.num_items
          == data_loader_class_2.num_items
          == data_loader_class_3.num_items
      )
      assert (
          data_loader_class_1.interactions.num_interactions
          == data_loader_class_2.interactions.num_interactions
          == data_loader_class_3.interactions.num_interactions
          == data_loader_class_1.num_interactions
          == data_loader_class_2.num_interactions
          == data_loader_class_3.num_interactions
      )
  
      data_loader_class_1_first_batch = next(iter(data_loader_class_1))
      data_loader_class_2_first_batch = next(iter(data_loader_class_2))
      data_loader_class_3_first_batch = next(iter(data_loader_class_3))
  
      for idx in range(len(data_loader_class_1_first_batch[0])):
          assert (
              len(data_loader_class_1_first_batch[0][idx])
              == len(data_loader_class_2_first_batch[0][idx])
              == len(data_loader_class_3_first_batch[0][idx])
              == common_data_loader_kwargs["batch_size"]
          )
  
          assert (
              data_loader_class_1_first_batch[0][idx].tolist()
              == data_loader_class_2_first_batch[0][idx].tolist()
              == data_loader_class_3_first_batch[0][idx].tolist()
          )
  
      assert (
          data_loader_class_1_first_batch[1].shape
          == data_loader_class_2_first_batch[1].shape
          == data_loader_class_3_first_batch[1].shape
          == (
              common_data_loader_kwargs["batch_size"],
              interactions_kwargs["num_negative_samples"],
          )
      )
  
imports: import sys
  import numpy
  import pandas
  import pytest
  from collie.interactions import ApproximateNegativeSamplingInteractionsDataLoader, ExplicitInteractions, HDF5Interactions, HDF5InteractionsDataLoader, Interactions, InteractionsDataLoader
label_desc: Use image node_id 8 for calling a global function with example usage: test_instantiate_data_loaders(ratings_matrix_for_interactions, sparse_ratings_matrix_for_interactions, df_for_interactions, data_loader_class) without return types