def get_data_cache_dir(data_dir, subdir=None):
 data_cache_dir = os.environ.get('NEON_DATA_CACHE_DIR')
 if (data_cache_dir is None):
  data_cache_dir = data_dir
 if subdir:
  subdir = (subdir if isinstance(subdir, list) else [subdir])
  data_cache_dir = os.path.join(data_cache_dir, *subdir)
 if (not os.path.exists(data_cache_dir)):
  os.makedirs(data_cache_dir)
 return data_cache_dir

def get_data_cache_dir ( data_dir , subdir = None ) : data_cache_dir = os . environ . get ( 'NEON_DATA_CACHE_DIR' ) if ( data_cache_dir is None ) : data_cache_dir = data_dir if subdir : subdir = ( subdir if isinstance ( subdir , list ) else [ subdir ] ) data_cache_dir = os . path . join ( data_cache_dir , * subdir ) if ( not os . path . exists ( data_cache_dir ) ) : os . makedirs ( data_cache_dir ) return data_cache_dir
function for getting cache directory to store data cache files .