docstr: Helper function to clean up the train and eval functions
  :param input_ids: inputs to tokenize.
  :param pad_to_max_length: Whether you want to pad the inputs to the tokenizer.max_len
  :return: Tensor containing training data.
docstr_tok: ["Helper","function","to","clean","up","the","train","and","eval","functions",":","param","input_ids",":","inputs","to","tokenize",".",":","param","pad_to_max_length",":","Whether","you","want","to","pad","the","inputs","to","the","tokenizer.max_len",":","return",":","Tensor","containing","training","data","."]
code: def _tokenize_input_ids(
      self, input_ids: list, pad_to_max_length: bool = True
  ):
      """
      Helper function to clean up the train and eval functions
      :param input_ids: inputs to tokenize.
      :param pad_to_max_length: Whether you want to pad the inputs to the tokenizer.max_len
      :return: Tensor containing training data.
      """
      inputs = torch.cat(
          [
              self.tokenizer.encode(
                  input_ids[i],
                  add_special_tokens=True,
                  max_length=self.tokenizer.max_len,
                  pad_to_max_length=pad_to_max_length,
                  return_tensors="pt",
              )
              for i in range(len(input_ids))
          ]
      )
      return inputs
  
imports: import re
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.utils.data import Dataset, DataLoader, random_split
  from tqdm import tqdm
  from reformer_pytorch import Reformer, ReformerLM
  from transformers import BertTokenizer, PreTrainedTokenizer
  from fairseq.optim.adafactor import Adafactor
  import os
  import json
  import logging
  from datetime import datetime
label_desc: Use image node_id 4 for calling the ReformerTrainer obj's underlying member method code with example usage: obj._tokenize_input_ids(input_ids, pad_to_max_length) and returns: inputs