code: def cache_dir_from_config(config):
      return resolve_from_str(
          config.getini("cache_dir"), config.rootdir
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  from collections import OrderedDict
  import attr
  import py
  import six
  import pytest
  from .compat import _PY2
  from .pathlib import Path
  from .pathlib import resolve_from_str
  from .pathlib import rm_rf
label_desc: Use image node_id 2 for calling the Cache obj's underlying member method code with example usage: obj.cache_dir_from_config(config) and returns: resolve_from_str