code: def get_default_processors(resources, lang):
      """
      Build a default package for this language
  
      Will add each of pos, lemma, depparse, etc if those are available
      Uses the existing models scraped from the language directories into resources.json, as relevant
      """
      if lang == "multilingual":
          return {"langid": "ud"}
  
      default_package = default_treebanks[lang]
      default_processors = {}
      if lang in default_tokenizer:
          default_processors["tokenize"] = default_tokenizer[lang]
      else:
          default_processors["tokenize"] = default_package
  
      if (
          "mwt" in resources[lang]
          and default_processors["tokenize"] in resources[lang]["mwt"]
      ):
          # if this doesn't happen, we just skip MWT
          default_processors["mwt"] = default_package
  
      if "lemma" in resources[lang]:
          expected_lemma = default_package + "_nocharlm"
          if expected_lemma in resources[lang]["lemma"]:
              default_processors["lemma"] = expected_lemma
      elif lang not in allowed_empty_languages:
          default_processors["lemma"] = "identity"
  
      if "pos" in resources[lang]:
          default_processors["pos"] = get_default_pos_package(
              lang, default_package
          )
          if default_processors["pos"] not in resources[lang]["pos"]:
              raise AssertionError(
                  "Expected POS model not in resources: %s"
                  % default_processors["pos"]
              )
      elif lang not in allowed_empty_languages:
          raise AssertionError(
              "Expected to find POS models for language %s" % lang
          )
  
      if "depparse" in resources[lang]:
          default_processors["depparse"] = get_default_depparse_package(
              lang, default_package
          )
          if (
              default_processors["depparse"]
              not in resources[lang]["depparse"]
          ):
              raise AssertionError(
                  "Expected depparse model not in resources: %s"
                  % default_processors["depparse"]
              )
      elif lang not in allowed_empty_languages:
          raise AssertionError(
              "Expected to find depparse models for language %s" % lang
          )
  
      if lang in default_ners:
          default_processors["ner"] = default_ners[lang]
  
      if lang in default_sentiment:
          default_processors["sentiment"] = default_sentiment[lang]
  
      if lang in default_constituency:
          default_processors["constituency"] = default_constituency[
              lang
          ]
  
      optional = get_default_optional_processors(resources, lang)
      if optional:
          default_processors["optional"] = optional
  
      return default_processors
  
imports: import argparse
  from collections import defaultdict
  import json
  import os
  from pathlib import Path
  import hashlib
  import shutil
  import zipfile
  from stanza import __resources_version__
  from stanza.models.common.constant import lcode2lang, two_to_three_letters, three_to_two_letters
  from stanza.resources.default_packages import PACKAGES, TRANSFORMERS, TRANSFORMER_NICKNAMES
  from stanza.resources.default_packages import *
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 25 for calling a global function with example usage: get_default_processors(resources, lang) and returns: default_processors, dict