def _create_titled_dataset(root, key, title, data, comp_kw=None):
 comp_kw = ({} if (comp_kw is None) else comp_kw)
 out = root.create_dataset(key, data=data, **comp_kw)
 out.attrs['TITLE'] = title
 return out

def _create_titled_dataset ( root , key , title , data , comp_kw = None ) : comp_kw = ( { } if ( comp_kw is None ) else comp_kw ) out = root . create_dataset ( key , data = data , ** comp_kw ) out . attrs [ 'TITLE' ] = title return out
helper to create a titled dataset in h5py .