(data_dir, subdir=None)
return data_cache_dir
Function for getting cache directory to store data cache files.

    Since the data cache contains large files, it is ideal to control the
    location independently from the system cache, which defaults to
    the user homedir if not otherwise specified.

    This function will make the directory if it doesn't yet exist.

    Arguments:
        data_dir (str): the dir to use if NEON_DATA_CACHE_DIR is not
                        present in the environment.
        subdir (str): sub directory inside of the cache dir that should
                      be returned.
Function for getting cache directory to store data cache files.
Function for getting cache directory to store data cache files .
def get_data_cache_dir(data_dir, subdir=None):
    """
    Function for getting cache directory to store data cache files.

    Since the data cache contains large files, it is ideal to control the
    location independently from the system cache, which defaults to
    the user homedir if not otherwise specified.

    This function will make the directory if it doesn't yet exist.

    Arguments:
        data_dir (str): the dir to use if NEON_DATA_CACHE_DIR is not
                        present in the environment.
        subdir (str): sub directory inside of the cache dir that should
                      be returned.
    """
    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