code: def __init__(self, model, word_to_idx, mapto, device):
      self.model = model
      self.word_to_idx = word_to_idx
      self.mapto = mapto
      self.device = device
  
file_path: TextAttack/textattack/constraints/grammaticality/language_models/learning_to_write/language_model_helpers.py
imports: import os
  import numpy
  import torch
  from textattack.shared.utils import LazyLoader
  from .rnn_model import RNNModel
label_desc: Use image node_id 1 to create a new QueryHandler object  with example: obj = QueryHandler(model, word_to_idx, mapto, device)