code: def generate_dummy_data(
      num_users=15000,
      num_items=30000,
      interaction_density=0.00045,
      num_user_features=200,
      num_item_features=200,
      n_features_per_user=20,
      n_features_per_item=20,
      pos_int_ratio=0.5,
      return_datasets=False,
  ):
      if pos_int_ratio <= 0.0:
          raise Exception("pos_int_ratio must be > 0")
  
      print("Generating positive interactions")
      interactions = sp.rand(
          num_users,
          num_items,
          density=interaction_density * pos_int_ratio,
      )
      if pos_int_ratio < 1.0:
          print("Generating negative interactions")
          interactions += -1 * sp.rand(
              num_users,
              num_items,
              density=interaction_density * (1 - pos_int_ratio),
          )
  
      print("Generating user features")
      user_features = sp.rand(
          num_users,
          num_user_features,
          density=float(n_features_per_user) / num_user_features,
      )
  
      print("Generating item features")
      item_features = sp.rand(
          num_items,
          num_item_features,
          density=float(n_features_per_item) / num_item_features,
      )
  
      if return_datasets:
          interactions = create_tensorrec_dataset_from_sparse_matrix(
              interactions
          )
          user_features = create_tensorrec_dataset_from_sparse_matrix(
              user_features
          )
          item_features = create_tensorrec_dataset_from_sparse_matrix(
              item_features
          )
  
      return interactions, user_features, item_features
  
imports: import math
  import numpy
  import random
  import scipy.sparse
  import six
  import tensorflow
  from weakref import WeakKeyDictionary
  from .input_utils import create_tensorrec_dataset_from_sparse_matrix, create_tensorrec_dataset_from_tfrecord
label_desc: Use image node_id 4 for calling a global function with example usage: generate_dummy_data(num_users, num_items, interaction_density, num_user_features, num_item_features, n_features_per_user, n_features_per_item, pos_int_ratio, return_datasets) and returns: interactions,  user_features,  item_features