code: def add_mwt(processors, resources, lang):
      """Add mwt if tokenize is passed without mwt.
  
      If tokenize is in the list, but mwt is not, and there is a corresponding
      tokenize and mwt pair in the resources file, mwt is added so no missing
      mwt errors are raised.
  
      TODO: how does this handle EWT in English?
      """
      value = processors[TOKENIZE]
      if (
          value in resources[lang][PACKAGES]
          and MWT in resources[lang][PACKAGES][value]
      ):
          logger.warning(
              "Language %s package %s expects mwt, which has been added",
              lang,
              value,
          )
          processors[MWT] = value
      elif (
          value in resources[lang][TOKENIZE]
          and MWT in resources[lang]
          and value in resources[lang][MWT]
      ):
          logger.warning(
              "Language %s package %s expects mwt, which has been added",
              lang,
              value,
          )
          processors[MWT] = value
  
imports: from collections import defaultdict, namedtuple
  import errno
  import hashlib
  import json
  import logging
  import os
  from pathlib import Path
  import requests
  import shutil
  import tempfile
  import zipfile
  from tqdm.auto import tqdm
  from stanza.utils.helper_func import make_table
  from stanza.pipeline._constants import TOKENIZE, MWT, POS, LEMMA, DEPPARSE, NER, SENTIMENT
  from stanza.pipeline.registry import PIPELINE_NAMES, PROCESSOR_VARIANTS
  from stanza.resources.default_packages import PACKAGES
  from stanza._version import __resources_version__
label_desc: Use image node_id 10 for calling a global function with example usage: add_mwt(processors, resources, lang) without return types