code: def read_data_sst(
      data_path,
      max_input_length=64,
      min_count=1,
      train_with_valid=False,
      train_ratio=1.0,
      valid_ratio=1.0,
      is_binary=False,
      only_sentence=False,
  ):
      word_id_dict = dict()
      word_num_dict = Counter()
  
      sst_path = os.path.join(data_path, "sst")
      logger.info("Reading SST data...")
      train_file_name = os.path.join(sst_path, "trees", "train.txt")
      valid_file_name = os.path.join(sst_path, "trees", "dev.txt")
      test_file_name = os.path.join(sst_path, "trees", "test.txt")
      train_trees = read_trees(train_file_name)
      train_phrases = sst_get_phrases(
          train_trees, train_ratio, is_binary, only_sentence
      )
      logger.info("Finish load train phrases.")
      valid_trees = read_trees(valid_file_name)
      valid_phrases = sst_get_phrases(
          valid_trees, valid_ratio, is_binary, only_sentence
      )
      logger.info("Finish load valid phrases.")
      if train_with_valid:
          train_phrases += valid_phrases
      test_trees = read_trees(test_file_name)
      test_phrases = sst_get_phrases(
          test_trees, valid_ratio, is_binary, only_sentence=True
      )
      logger.info("Finish load test phrases.")
  
      # get word_id_dict
      word_id_dict["<pad>"] = 0
      word_id_dict["<unknown>"] = 1
      load_word_num_dict(train_phrases, word_num_dict)
      logger.info("Finish load train words: %d.", len(word_num_dict))
      load_word_num_dict(valid_phrases, word_num_dict)
      load_word_num_dict(test_phrases, word_num_dict)
      logger.info(
          "Finish load valid+test words: %d.", len(word_num_dict)
      )
      word_id_dict = get_word_id_dict(
          word_num_dict, word_id_dict, min_count
      )
      logger.info("After trim vocab length: %d.", len(word_id_dict))
  
      logger.info("Loading embedding...")
      embedding = init_trainable_embedding(
          os.path.join(data_path, "glove.840B.300d.txt"), word_id_dict
      )
      logger.info("Finish initialize word embedding.")
  
      dataset_train = sst_get_trainable_data(
          train_phrases, word_id_dict, max_input_length
      )
      logger.info("Loaded %d training samples.", len(dataset_train))
      dataset_valid = sst_get_trainable_data(
          valid_phrases, word_id_dict, max_input_length
      )
      logger.info("Loaded %d validation samples.", len(dataset_valid))
      dataset_test = sst_get_trainable_data(
          test_phrases, word_id_dict, max_input_length
      )
      logger.info("Loaded %d test samples.", len(dataset_test))
  
      return (
          dataset_train,
          dataset_valid,
          dataset_test,
          torch.from_numpy(embedding),
      )
  
imports: import logging
  import os
  import pickle
  from collections import Counter
  import numpy
  import torch
  from torch.utils import data
label_desc: Use image node_id 12 for calling a global function with example usage: read_data_sst(data_path, max_input_length, min_count, train_with_valid, train_ratio, valid_ratio, is_binary, only_sentence) and returns: dataset_train,  dataset_valid,  dataset_test,  torch