code: def split_features(
      state_and_action_with_presence: Tuple[torch.Tensor, torch.Tensor],
      state_feat_num: int,
      action_feat_num: int,
  ):
      state_value = state_and_action_with_presence[0].narrow(
          1, 0, state_feat_num
      )
      state_presence = state_and_action_with_presence[1].narrow(
          1, 0, state_feat_num
      )
      action_value = state_and_action_with_presence[0].narrow(
          1, state_feat_num, action_feat_num
      )
      action_presence = state_and_action_with_presence[1].narrow(
          1, state_feat_num, action_feat_num
      )
      return (state_value, state_presence), (
          action_value,
          action_presence,
      )
  
file_path: ReAgent/reagent/prediction/synthetic_reward/synthetic_reward_predictor_wrapper.py
imports: from typing import Tuple
  import torch
  import torch.nn
  from reagent.models.base import ModelBase
  from reagent.preprocessing.preprocessor import Preprocessor
label_desc: Use image node_id 1 for calling a global function with example usage: split_features(state_and_action_with_presence, state_feat_num, action_feat_num) and returns: state_value,  state_presence,  action_value,  action_presence