code: def __init__(self, config):
      super().__init__()
      self.bsize = config["bsize"]
      self.word_emb_dim = config["word_emb_dim"]
      self.enc_lstm_dim = config["enc_lstm_dim"]
      self.pool_type = config["pool_type"]
      self.dpout_model = config["dpout_model"]
      self.version = 1 if "version" not in config else config["version"]
  
      self.enc_lstm = nn.LSTM(
          self.word_emb_dim,
          self.enc_lstm_dim,
          1,
          bidirectional=True,
          dropout=self.dpout_model,
      )
  
      assert self.version in [1, 2]
      if self.version == 1:
          self.bos = "<s>"
          self.eos = "</s>"
          self.max_pad = True
          self.moses_tok = False
      elif self.version == 2:
          self.bos = "<p>"
          self.eos = "</p>"
          self.max_pad = False
          self.moses_tok = True
  
imports: import time
  import numpy
  import torch
  from torch import nn
  import textattack
label_desc: Use image node_id 1 to create a new InferSentModel object from inherited base classes: nn with example: obj = InferSentModel(config)