class_docstr: Wrapper class for calling ngram_repeat_block cuda extension.
code: def __init__(self):
      super(NGramRepeatBlock, self).__init__()
      current = os.getcwd()
      abspath = os.path.abspath(__file__)
      dname = os.path.dirname(abspath)
      os.chdir(dname)
  
      try:
          self.ngram_repeat_block_cuda = load(
              name="ngram_repeat_block_cuda",
              sources=[
                  "../clib/cuda/ngram_repeat_block_cuda.cpp",
                  "../clib/cuda/ngram_repeat_block_cuda_kernel.cu",
              ],
          )
      except Exception as e:
          logging.warning(f"Unable to load ngram blocking on GPU: {e}")
          self.ngram_repeat_block_cuda = None
  
      os.chdir(current)
  
file_path: ParlAI/parlai/ops/ngram_repeat_block.py
imports: import parlai.utils.logging
  import torch
  from torch import nn
  import os
  from torch.utils.cpp_extension import load
label_desc: Use image node_id 1 to create a new NGramRepeatBlock object from inherited base classes: nn with example: obj = NGramRepeatBlock()