class_docstr: An implementation of `<https://arxiv.org/abs/1804.07998>`_ adapted from
  `<https://github.com/nesl/nlp_adversarial_examples>`_.
code: def __init__(self):
      tf.get_logger().setLevel("INFO")
      lm_folder = utils.download_from_s3(GoogLMHelper.CACHE_PATH)
      self.PBTXT_PATH = os.path.join(
          lm_folder, "graph-2016-09-10-gpu.pbtxt"
      )
      self.CKPT_PATH = os.path.join(lm_folder, "ckpt-*")
      self.VOCAB_PATH = os.path.join(lm_folder, "vocab-2016-09-10.txt")
  
      self.BATCH_SIZE = 1
      self.NUM_TIMESTEPS = 1
      self.MAX_WORD_LEN = 50
  
      self.vocab = lm_data_utils.CharsVocabulary(
          self.VOCAB_PATH, self.MAX_WORD_LEN
      )
      with tf.device("/gpu:1"):
          self.graph = tf.Graph()
          self.sess = tf.compat.v1.Session(graph=self.graph)
      with self.graph.as_default():
          self.t = lm_utils.LoadModel(
              self.sess, self.graph, self.PBTXT_PATH, self.CKPT_PATH
          )
  
      self.lm_cache = lru.LRU(2**18)
  
file_path: TextAttack/textattack/constraints/grammaticality/language_models/google_language_model/alzantot_goog_lm.py
imports: import os
  import lru
  import numpy
  from textattack.shared import utils
  from .None import lm_data_utils, lm_utils
label_desc: Use image node_id 1 to create a new GoogLMHelper object  with example: obj = GoogLMHelper()