class_docstr: An iterator dedicated to ParallelCorpus.
  
  Args:
      corpus (ParallelCorpus): corpus to iterate;
      transform (TransformPipe): transforms to be applied to corpus;
      skip_empty_level (str): security level when encouter empty line;
      stride (int): iterate corpus with this line stride;
      offset (int): iterate corpus with this line offset.
class_docstr_tok: ["An","iterator","dedicated","to","ParallelCorpus",".","Args",":","corpus","(","ParallelCorpus",")",":","corpus","to","iterate",";","transform","(","TransformPipe",")",":","transforms","to","be","applied","to","corpus",";","skip_empty_level","(","str",")",":","security","level","when","encouter","empty","line",";","stride","(","int",")",":","iterate","corpus","with","this","line","stride",";","offset","(","int",")",":","iterate","corpus","with","this","line","offset","."]
code: def __init__(
      self,
      corpus,
      transform,
      skip_empty_level="warning",
      stride=1,
      offset=0,
  ):
      self.cid = corpus.id
      self.corpus = corpus
      self.transform = transform
      if skip_empty_level not in ["silent", "warning", "error"]:
          raise ValueError(
              f"Invalid argument skip_empty_level={skip_empty_level}"
          )
      self.skip_empty_level = skip_empty_level
      self.stride = stride
      self.offset = offset
  
imports: import os
  from onmt.utils.logging import logger
  from onmt.constants import CorpusName, CorpusTask
  from onmt.transforms import TransformPipe
  from onmt.inputters.text_utils import process, parse_features, append_features_to_text
  from contextlib import contextmanager
  import itertools
label_desc: Use image node_id 1 to create a new ParallelCorpusIterator object from inherited base classes: object with example: obj = ParallelCorpusIterator(corpus, transform, skip_empty_level, stride, offset)