code: def _split_interactions_warm_start(interactions):
      mask_size = len(interactions.data)
      mask = np.random.choice(
          a=[False, True], size=mask_size, p=[0.2, 0.8]
      )
      not_mask = np.invert(mask)
  
      train_interactions = sp.coo_matrix(
          (
              interactions.data[mask],
              (interactions.row[mask], interactions.col[mask]),
          ),
          shape=interactions.shape,
      )
      test_interactions = sp.coo_matrix(
          (
              interactions.data[not_mask],
              (interactions.row[not_mask], interactions.col[not_mask]),
          ),
          shape=interactions.shape,
      )
  
      return train_interactions, test_interactions
  
imports: from io import BytesIO
  import os
  import requests
  from zipfile import ZipFile
  import numpy
  import scipy.sparse
  from sklearn.base import TransformerMixin
  from sklearn.feature_extraction.text import CountVectorizer
  from sklearn.pipeline import Pipeline, FeatureUnion
  from sklearn.preprocessing import LabelBinarizer
  from lightfm import datasets
label_desc: Use image node_id 2 for calling a global function with example usage: _split_interactions_warm_start(interactions) and returns: train_interactions,  test_interactions