code: def _read_v3_10x_h5(filename):
      
      with tables.open_file(str(filename), 'r') as f:
          try:
              dsets = {}
              for node in f.walk_nodes('/matrix', 'Array'):
                  dsets[node.name] = node.read()
              from scipy.sparse import csr_matrix
              M, N = dsets['shape']
              data = dsets['data']
              if dsets['data'].dtype == np.dtype('int32'):
                  data = dsets['data'].view('float32')
                  data[:] = dsets['data']
              matrix = csr_matrix((data, dsets['indices'], dsets['indptr']),
                                  shape=(N, M))
              adata = AnnData(matrix,
                              {'obs_names': dsets['barcodes'].astype(str)},
                              {'var_names': dsets['name'].astype(str),
                               'gene_ids': dsets['id'].astype(str),
                               'feature_types': dsets['feature_type'].astype(str),
                               'genome': dsets['genome'].astype(str)})
              logg.info(t=True)
              return adata
          except KeyError:
              raise Exception('File is missing one or more required datasets.')
docs: Read hdf5 file from Cell Ranger v3 or later versions.