def get(datasets_identifiers, identifier_type='<STR_LIT>', history_id=None):
history_id = history_id or os.environ['<STR_LIT>']<EOL>gi = get_galaxy_connection(history_id=history_id, obj=False)<EOL>for dataset_identifier in datasets_identifiers:<EOL><INDENT>file_path = '<STR_LIT>' % dataset_identifier<EOL>log.debug('<STR_LIT>', gi, history_id, dataset_identifier)<EOL>if not os.path.exists(file_path):<EOL><INDENT>hc = HistoryClient(gi)<EOL>dc = DatasetClient(gi)<EOL>history = hc.show_history(history_id, contents=True)<EOL>datasets = {ds[identifier_type]: ds['<STR_LIT:id>'] for ds in history}<EOL>if identifier_type == '<STR_LIT>':<EOL><INDENT>dataset_identifier = int(dataset_identifier)<EOL><DEDENT>dc.download_dataset(datasets[dataset_identifier], file_path=file_path, use_default_filename=False)<EOL><DEDENT>else:<EOL><INDENT>log.debug('<STR_LIT>')<EOL><DEDENT><DEDENT>return file_path<EOL>
Given the history_id that is displayed to the user, this function will
download the file[s] from the history and stores them under /import/
Return value[s] are the path[s] to the dataset[s] stored under /import/