code: def _parse_item_metadata(num_items, item_metadata_raw, genres_raw):
      genres = []
  
      for line in genres_raw:
          if line:
              genre, gid = line.split("|")
              genres.append("genre:{}".format(genre))
  
      id_feature_labels = np.empty(num_items, dtype=str)
      genre_feature_labels = np.array(genres)
  
      id_features = sp.identity(
          num_items, format="csr", dtype=np.float32
      )
      genre_features = sp.lil_matrix(
          (num_items, len(genres)), dtype=np.float32
      )
  
      for line in item_metadata_raw:
          if not line:
              continue
  
          splt = line.split("|")
  
          # Zero-based indexing
          iid = int(splt[0]) - 1
          title = splt[1]
  
          id_feature_labels[iid] = title
  
          item_genres = [
              idx for idx, val in enumerate(splt[5:]) if int(val) > 0
          ]
  
          for gid in item_genres:
              genre_features[iid, gid] = 1.0
  
      return (
          id_features,
          id_feature_labels,
          genre_features.tocsr(),
          genre_feature_labels,
      )
  
file_path: lightfm/lightfm/datasets/movielens.py
imports: import itertools
  import os
  import zipfile
  import numpy
  import scipy.sparse
  from lightfm.datasets import _common
label_desc: Use image node_id 5 for calling a global function with example usage: _parse_item_metadata(num_items, item_metadata_raw, genres_raw) and returns: id_features,  id_feature_labels,  genre_features,  genre_feature_labels