code: def load_spacy_lang(name: str | pathlib.Path, **kwargs) -> Language:
      """
      Load a spaCy ``Language`` — a shared vocabulary and language-specific data
      for tokenizing text, and (if available) model data and a processing pipeline
      containing a sequence of components for annotating a document — and cache results,
      for quick reloading as needed.
  
      Note that as of spaCy v3, for which pipeline aliases are no longer allowed,
      this function is just a convenient access point to underlying :func:`spacy.load()`.
  
      .. code-block:: pycon
  
          >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm")
          >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm", disable=("parser",))
          >>> textacy.load_spacy_lang("ar")
          ...
          OSError: [E050] Can't find model 'ar'. It doesn't seem to be a Python package or a valid path to a data directory.
  
      Args:
          name: Name or path to the spaCy language pipeline to load.
          **kwargs
  
      Note:
          Although spaCy's API specifies some kwargs as ``List[str]``, here we require
          ``Tuple[str, ...]`` equivalents. Language pipelines are stored in an LRU cache
          with unique identifiers generated from the hash of the function name and args —
          and lists aren't hashable.
  
      Returns:
          Loaded spaCy ``Language``.
  
      Raises:
          OSError
  
      See Also:
          https://spacy.io/api/top-level#spacy.load
      """
      spacy_lang = spacy.load(name, **kwargs)
      LOGGER.info("loaded '%s' spaCy language pipeline", name)
      return spacy_lang
  
imports: from __future__ import annotations
  import functools
  import logging
  import pathlib
  from typing import Optional
  import spacy
  from cachetools import cached
  from cachetools.keys import hashkey
  from spacy.language import Language
  from spacy.tokens import Doc
  from ..None import cache, errors, types, utils
  from .None import extensions
  from .None import utils
label_desc: Use image node_id 1 for calling a global function with example usage: load_spacy_lang(name) and returns: spacy_lang