code: def fetch_id_list_features(
      state: rlt.FeatureData, action: rlt.FeatureData
  ) -> KeyedJaggedTensor:
      assert (
          state.id_list_features is not None
          or action.id_list_features is not None
      )
      if (
          state.id_list_features is not None
          and action.id_list_features is None
      ):
          sparse_features = state.id_list_features
      elif (
          state.id_list_features is None
          and action.id_list_features is not None
      ):
          sparse_features = action.id_list_features
      elif (
          state.id_list_features is not None
          and action.id_list_features is not None
      ):
          sparse_features = KeyedJaggedTensor.concat(
              [state.id_list_features, action.id_list_features]
          )
      else:
          raise ValueError
      # TODO: add id_list_score_features
      return sparse_features
  
file_path: ReAgent/reagent/models/sparse_dqn.py
imports: from typing import List
  import torch
  from reagent.core import types
  from reagent.models import FullyConnectedNetwork
  from reagent.models.base import ModelBase
  from torchrec.models.dlrm import SparseArch
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_id_list_features(state, action) and returns: sparse_features