code: def test_make_orth_variants(nlp):
      single = [
          {"tags": ["NFP"], "variants": ["…", "..."]},
          {
              "tags": [":"],
              "variants": ["-", "—", "–", "--", "---", "——"],
          },
      ]
      # fmt: off
      words = ["\n\n", "A", "\t", "B", "a", "b", "…", "...", "-", "—", "–", "--", "---", "——"]
      tags = ["_SP", "NN", "\t", "NN", "NN", "NN", "NFP", "NFP", ":", ":", ":", ":", ":", ":"]
      # fmt: on
      spaces = [True] * len(words)
      spaces[0] = False
      spaces[2] = False
      doc = Doc(nlp.vocab, words=words, spaces=spaces, tags=tags)
      augmenter = create_orth_variants_augmenter(
          level=0.2, lower=0.5, orth_variants={"single": single}
      )
      with make_docbin([doc] * 10) as output_file:
          reader = Corpus(output_file, augmenter=augmenter)
          # Due to randomness, only test that it works without errors
          list(reader(nlp))
  
      # check that the following settings lowercase everything
      augmenter = create_orth_variants_augmenter(
          level=1.0, lower=1.0, orth_variants={"single": single}
      )
      with make_docbin([doc] * 10) as output_file:
          reader = Corpus(output_file, augmenter=augmenter)
          for example in reader(nlp):
              for token in example.reference:
                  assert token.text == token.text.lower()
  
      # check that lowercasing is applied without tags
      doc = Doc(nlp.vocab, words=words, spaces=[True] * len(words))
      augmenter = create_orth_variants_augmenter(
          level=1.0, lower=1.0, orth_variants={"single": single}
      )
      with make_docbin([doc] * 10) as output_file:
          reader = Corpus(output_file, augmenter=augmenter)
          for example in reader(nlp):
              for ex_token, doc_token in zip(example.reference, doc):
                  assert ex_token.text == doc_token.text.lower()
  
      # check that no lowercasing is applied with lower=0.0
      doc = Doc(nlp.vocab, words=words, spaces=[True] * len(words))
      augmenter = create_orth_variants_augmenter(
          level=1.0, lower=0.0, orth_variants={"single": single}
      )
      with make_docbin([doc] * 10) as output_file:
          reader = Corpus(output_file, augmenter=augmenter)
          for example in reader(nlp):
              for ex_token, doc_token in zip(example.reference, doc):
                  assert ex_token.text == doc_token.text
  
file_path: spaCy/spacy/tests/training/test_augmenters.py
imports: import random
  from contextlib import contextmanager
  import pytest
  from spacy.lang.en import English
  from spacy.pipeline._parser_internals.nonproj import contains_cycle
  from spacy.tokens import Doc, DocBin, Span
  from spacy.training import Corpus, Example
  from spacy.training.augment import create_lower_casing_augmenter, create_orth_variants_augmenter, make_whitespace_variant
  from ..util import make_tempdir
label_desc: Use image node_id 4 for calling a global function with example usage: test_make_orth_variants(nlp) without return types