code: def _generate(self, texts, n):
      results = []
      # Encode
      for label in texts:
          input_text = "{} {}".format(label, self.sep_token)
          input_ids = self.gen_tokenizer.encode(
              input_text, add_special_tokens=False, return_tensors="pt"
          )
          input_ids = input_ids.to(self.device)
  
          # Generate
          num_round, last_round = divmod(n, self.batch_size)
  
          for _n in [self.batch_size] * num_round + [last_round]:
              if _n == 0:
                  break
  
              output_sequences = self.gen_model.generate(
                  input_ids=input_ids,
                  pad_token_id=50256,  # avoid "Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation."
                  min_length=self.min_length,
                  max_length=self.max_length + len(input_ids[0]),
                  temperature=self.temperature,
                  top_k=self.top_k,
                  top_p=self.top_p,
                  repetition_penalty=self.repetition_penalty,
                  do_sample=True,
                  num_return_sequences=_n,
                  num_workers=1,
              )
  
              if len(output_sequences.shape) > 2:
                  output_sequences.squeeze_()
  
              # Decode
              for generated_sequence in output_sequences:
                  generated_sequence = generated_sequence.tolist()
                  # Decode text
                  generated_text = self.gen_tokenizer.decode(
                      generated_sequence,
                      clean_up_tokenization_spaces=True,
                  )
                  # Remove all text before label
                  generated_text = generated_text[len(input_text) :]
                  # Remove all text after the stop token
                  generated_text = generated_text[
                      : generated_text.find(self.stop_token)
                      if self.stop_token
                      else None
                  ]
                  # Replace sep_token by ' '
                  generated_text = generated_text.replace(
                      self.sep_token, " "
                  )
  
                  results.append(
                      {"label": label, "text": generated_text}
                  )
  
      results = pd.DataFrame(results).reset_index()
      results.rename(columns={"index": "id"}, inplace=True)
  
      return results[["id", "text", "label"]]
  
file_path: nlpaug/nlpaug/model/lang_models/lambada.py
imports: import pandas
  import json
  import os
  from nlpaug.model.lang_models import LanguageModels
label_desc: Use image node_id 4 for calling the Lambada obj's underlying member method code with example usage: obj._generate(texts, n) and returns: results