class_docstr: Contructor 
class_docstr_tok: ["Contructor"]
code: def h5py_dataset_iterator(self, g, prefix=""):
      for key in g.keys():
          item = g[key]
          path = "{}/{}".format(prefix, key)
          keys = [i for i in item.keys()]
          if isinstance(
              item[keys[0]], h5py.Dataset
          ):  # test for dataset
              data = {"path": path}
              for k in keys:
                  if not isinstance(item[k], h5py.Group):
                      dataset = np.array(item[k].value)
  
                      if type(dataset) is np.ndarray:
                          if dataset.size != 0:
                              if type(dataset[0]) is np.bytes_:
                                  dataset = [
                                      a.decode("ascii") for a in dataset
                                  ]
  
                      data.update({k: dataset})
  
              yield data
          else:  # test for group (go down)
              for s in self.h5py_dataset_iterator(item, path):
                  yield s
  
file_path: deepchem/examples/roitberg/pyanitools.py
imports: import h5py
  import numpy
  import platform
  import os
label_desc: Use image node_id 2 for calling the anidataloader obj's underlying member method code with example usage: obj.h5py_dataset_iterator(g, prefix) without return types