Update DataSource.py

dictionaries work although I didn't test them very thoroughly. Added a helper method, and I might add another one later for getting ids. There was some problems with the indentation when I copied it over so if there's an error look for indentations.