code: def get_mmf_cache_dir():
      config = get_global_config()
      cache_dir = config.env.cache_dir
      # If cache_dir path exists do not join to mmf root
      if not os.path.exists(cache_dir):
          cache_dir = os.path.join(get_mmf_root(), cache_dir)
      return cache_dir
  
imports: import collections
  import json
  import logging
  import os
  import warnings
  from ast import literal_eval
  from typing import List
  import torch
  from mmf.common.registry import registry
  from mmf.utils.env import import_user_module
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path, get_mmf_root
  from omegaconf import DictConfig, errors, OmegaConf
label_desc: Use image node_id 7 for calling a global function with example usage: get_mmf_cache_dir() and returns: cache_dir