code: def test_crop_itemseq(self):
      eta = 0.6
      config_dict = {
          "model": "GRU4Rec",
          "dataset": "seq_dataset",
          "data_path": current_path,
          "load_col": None,
          "train_neg_sample_args": None,
          "transform": "crop_itemseq",
          "eta": eta,
          "eval_args": {
              "split": {"RS": [0.3, 0.3, 0.4]},
              "order": "TO",
          },
      }
      train_dataset, valid_dataset, test_dataset = split_dataset(
          config_dict=config_dict
      )
      transform = new_transform(config_dict=config_dict)
  
      train_transform_interaction = transform(
          train_dataset, train_dataset.inter_feat
      )
      for crop_seq, length in zip(
          train_transform_interaction[transform.CROP_ITEM_SEQ],
          train_transform_interaction[transform.ITEM_SEQ_LEN],
      ):
          crop_len = math.floor(length * eta)
          last_seq = np.zeros(length - crop_len)
  
          assert (crop_seq[crop_len:length].numpy() == last_seq).all()
  
      valid_transform_interaction = transform(
          valid_dataset, valid_dataset.inter_feat
      )
      for crop_seq, length in zip(
          valid_transform_interaction[transform.CROP_ITEM_SEQ],
          valid_transform_interaction[transform.ITEM_SEQ_LEN],
      ):
          crop_len = math.floor(length * eta)
          last_seq = np.zeros(length - crop_len)
  
          assert (crop_seq[crop_len:length].numpy() == last_seq).all()
  
      test_transform_interaction = transform(
          test_dataset, test_dataset.inter_feat
      )
      for crop_seq, length in zip(
          test_transform_interaction[transform.CROP_ITEM_SEQ],
          test_transform_interaction[transform.ITEM_SEQ_LEN],
      ):
          crop_len = math.floor(length * eta)
          last_seq = np.zeros(length - crop_len)
  
          assert (crop_seq[crop_len:length].numpy() == last_seq).all()
  
file_path: RecBole/tests/data/test_transform.py
imports: import logging
  import os
  import math
  import numpy
  import pytest
  from recbole.config import Config
  from recbole.data import create_dataset
  from recbole.utils import init_seed
  from recbole.data.transform import construct_transform
label_desc: Use image node_id 3 for calling the TestTransform obj's underlying member method code with example usage: obj.test_crop_itemseq() without return types