code: def get_resources_sub_directory(resources_dir):
      resources_dir = Path(resources_dir)
      with (resources_dir / "metadata.json").open(encoding="utf8") as f:
          metadata = json.load(f)
      resource_name = metadata["name"]
      version = metadata["version"]
      sub_dir_name = "{r}-{v}".format(r=resource_name, v=version)
      return resources_dir / sub_dir_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 5 for calling a global function with example usage: get_resources_sub_directory(resources_dir) and returns: unknown