code: def load_resources(name, required_resources=None):
      """Load language specific resources
  
      Args:
          name (str): Resource name as in ``snips-nlu download <name>``. Can also
              be the name of a python package or a directory path.
          required_resources (dict, optional): Resources requirement
              dict which, when provided, allows to limit the amount of resources
              to load. By default, all existing resources are loaded.
      """
      if name in set(d.name for d in DATA_PATH.iterdir()):
          return load_resources_from_dir(
              DATA_PATH / name, required_resources
          )
      elif is_package(name):
          package_path = get_package_path(name)
          resources_sub_dir = get_resources_sub_directory(package_path)
          return load_resources_from_dir(
              resources_sub_dir, required_resources
          )
      elif Path(name).exists():
          path = Path(name)
          if (path / "__init__.py").exists():
              path = get_resources_sub_directory(path)
          return load_resources_from_dir(path, required_resources)
      else:
          raise MissingResource(
              "Language resource '{r}' not found. This may be "
              "solved by running "
              "'python -m snips_nlu download {r}'".format(r=name)
          )
  
imports: from __future__ import unicode_literals
  import json
  from collections import defaultdict
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems
  from snips_nlu.common.utils import get_package_path, is_package, json_string
  from snips_nlu.constants import CUSTOM_ENTITY_PARSER_USAGE, DATA_PATH, GAZETTEERS, NOISE, STEMS, STOP_WORDS, WORD_CLUSTERS, METADATA
  from snips_nlu.entity_parser.custom_entity_parser import CustomEntityParserUsage
label_desc: Use image node_id 1 for calling a global function with example usage: load_resources(name, required_resources) and returns: load_resources_from_dir, load_resources_from_dir, load_resources_from_dir