def get_precreated_dataset(precreated_datasets, name):
 names = [d.name for d in precreated_datasets]
 if (names.count(name) > 0):
  return precreated_datasets.pop(names.index(name))
 else:
  return None

def get_precreated_dataset ( precreated_datasets , name ) : names = [ d . name for d in precreated_datasets ] if ( names . count ( name ) > 0 ) : return precreated_datasets . pop ( names . index ( name ) ) else : return None
return a dataset matching a name from the list of precreated datasets .