class_docstr: Iterate Example objects from a file or directory of DocBin (.spacy)
  formatted data files.
  
  path (Path): The directory or filename to read from.
  gold_preproc (bool): Whether to set up the Example object with gold-standard
      sentences and tokens for the predictions. Gold preprocessing helps
      the annotations align to the tokenization, and may result in sequences
      of more consistent length. However, it may reduce run-time accuracy due
      to train/test skew. Defaults to False.
  max_length (int): Maximum document length. Longer documents will be
      split into sentences, if sentence boundaries are available. Defaults to
      0, which indicates no limit.
  limit (int): Limit corpus to a subset of examples, e.g. for debugging.
      Defaults to 0, which indicates no limit.
  augment (Callable[Example, Iterable[Example]]): Optional data augmentation
      function, to extrapolate additional examples from your annotations.
  shuffle (bool): Whether to shuffle the examples.
  
  DOCS: https://spacy.io/api/corpus
docstr: Yield examples from the data.
  
  nlp (Language): The current nlp object.
  YIELDS (Example): The examples.
  
  DOCS: https://spacy.io/api/corpus#call
docstr_tok: ["Yield","examples","from","the","data",".","nlp","(","Language",")",":","The","current","nlp","object",".","YIELDS","(","Example",")",":","The","examples",".","DOCS",":","https",":","\/\/spacy.io\/api\/corpus","#","call"]
code: def __call__(self, nlp: "Language") -> Iterator[Example]:
      """Yield examples from the data.
  
      nlp (Language): The current nlp object.
      YIELDS (Example): The examples.
  
      DOCS: https://spacy.io/api/corpus#call
      """
      ref_docs = self.read_docbin(
          nlp.vocab, walk_corpus(self.path, FILE_TYPE)
      )
      if self.shuffle:
          ref_docs = list(ref_docs)  # type: ignore
          random.shuffle(ref_docs)  # type: ignore
  
      if self.gold_preproc:
          examples = self.make_examples_gold_preproc(nlp, ref_docs)
      else:
          examples = self.make_examples(nlp, ref_docs)
      for real_eg in examples:
          for augmented_eg in self.augmenter(nlp, real_eg):  # type: ignore[operator]
              yield augmented_eg
  
imports: import random
  import warnings
  from pathlib import Path
  from typing import TYPE_CHECKING, Callable, Iterable, Iterator, List, Optional, Union
  import srsly
  from ..None import util
  from ..errors import Errors, Warnings
  from ..tokens import Doc, DocBin
  from ..vocab import Vocab
  from .augment import dont_augment
  from .example import Example
label_desc: Use image node_id 2 for calling the Corpus obj's underlying member method code with example usage: obj.__call__(nlp) without return types