def data_available(dataset_name=None):
try:<EOL><INDENT>from itertools import zip_longest<EOL><DEDENT>except ImportError:<EOL><INDENT>from itertools import izip_longest as zip_longest<EOL><DEDENT>dr = data_resources[dataset_name]<EOL>zip_urls = (dr['<STR_LIT>'], )<EOL>if '<STR_LIT>' in dr: zip_urls += (dr['<STR_LIT>'], )<EOL>else: zip_urls += ([],)<EOL>for file_list, save_list in zip_longest(*zip_urls, fillvalue=[]):<EOL><INDENT>for f, s in zip_longest(file_list, save_list, fillvalue=None):<EOL><INDENT>if s is not None: f=s <EOL>if not os.path.exists(os.path.join(data_path, dataset_name, f)):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Check if the data set is available on the local machine already.