def find_data(atom, name): child = atomsearch.find_path(atom, name) data_atom = child.find('data') if data_atom and 'data' in data_atom.attrs: return data_atom.attrs['data']