code: def test_load_custom_model():
      """
      The custom spacy language modules should be correctly loaded into the doc.
      """
      model_mapping = {"nl": "ents"}
      lang = (
          DOC_5.language
          if DOC_5.is_reliable_language
          else DOC_5.hint_language
      )
      assert lang == "nl"
      assert sorted(DOC_5.find_ents()) == sorted(
          [("Facebook", "GPE"), ("Mark Zuckerberg", "PERSON")]
      )
      assert DOC_5.find_ents(model_mapping[lang]) == []
      assert sorted(
          DOC_5.find_ents(ent_attributes=("end_char", "text"))
      ) == sorted([(15, "Mark Zuckerberg"), (51, "Facebook")])
  
imports: import re
  from unittest import mock
  import pytest
  import spacy
  import numpy
  from fakeredis import FakeRedis
  from textpipe.doc import Doc, TextpipeMissingModelException, RedisIDFWeightingMismatchException
  from textpipe.wrappers import RedisKeyedVectors
label_desc: Use image node_id 1 for calling a global function with example usage: test_load_custom_model() without return types