code: def test_gold_biluo_4791(en_vocab, en_tokenizer):
      doc = en_tokenizer("I'll return the A54 amount")
      gold_words = ["I", "'ll", "return", "the", "A", "54", "amount"]
      gold_spaces = [False, True, True, True, False, True, False]
      entities = [(16, 19, "MONEY")]
      example = Example.from_dict(
          doc,
          {
              "words": gold_words,
              "spaces": gold_spaces,
              "entities": entities,
          },
      )
      ner_tags = example.get_aligned_ner()
      assert ner_tags == ["O", "O", "O", "O", "U-MONEY", "O"]
  
      doc = en_tokenizer("I'll return the $54 amount")
      gold_words = ["I", "'ll", "return", "the", "$", "54", "amount"]
      gold_spaces = [False, True, True, True, False, True, False]
      entities = [(16, 19, "MONEY")]
      example = Example.from_dict(
          doc,
          {
              "words": gold_words,
              "spaces": gold_spaces,
              "entities": entities,
          },
      )
      ner_tags = example.get_aligned_ner()
      assert ner_tags == ["O", "O", "O", "O", "B-MONEY", "L-MONEY", "O"]
  
imports: import random
  import numpy
  import pytest
  import srsly
  from thinc.api import Adam, compounding
  import spacy
  from spacy.lang.en import English
  from spacy.tokens import Doc, DocBin
  from spacy.training import Alignment, Corpus, Example, biluo_tags_to_offsets, biluo_tags_to_spans, docs_to_json, iob_to_biluo, offsets_to_biluo_tags
  from spacy.training.align import get_alignments
  from spacy.training.alignment_array import AlignmentArray
  from spacy.training.converters import json_to_docs
  from spacy.training.loop import train_while_improving
  from spacy.util import get_words_and_spaces, load_config_from_str, load_model_from_path, minibatch
  from ..util import make_tempdir
label_desc: Use image node_id 22 for calling a global function with example usage: test_gold_biluo_4791(en_vocab, en_tokenizer) without return types