code: def get_sparse_tensor_info(self, x, is_bseq=False):
      indices = []
      if is_bseq:
          for sid, bseq in enumerate(x):
              for t, basket in enumerate(bseq):
                  for item_id in basket:
                      indices.append([sid, t, item_id])
      else:
          for bid, basket in enumerate(x):
              for item_id in basket:
                  indices.append([bid, item_id])
  
      values = np.ones(len(indices), dtype=np.float32)
      indices = np.array(indices, dtype=np.int32)
      shape = np.array(
          [len(x), self.max_seq_length, self.n_items], dtype=np.int64
      )
      return indices, values, shape
  
file_path: cornac/cornac/models/beacon/beacon_tf.py
imports: import numpy
  import warnings
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the BeaconModel obj's underlying member method code with example usage: obj.get_sparse_tensor_info(x, is_bseq) and returns: indices,  values,  shape