def read_tracers_h5(xdmf_file, infoname, snapshot, position):
xdmf_root = xmlET.parse(str(xdmf_file)).getroot()<EOL>tra = {}<EOL>tra[infoname] = [{}, {}]  <EOL>if position:<EOL><INDENT>for axis in '<STR_LIT>':<EOL><INDENT>tra[axis] = [{}, {}]<EOL><DEDENT><DEDENT>for elt_subdomain in xdmf_root[<NUM_LIT:0>][<NUM_LIT:0>][snapshot].findall('<STR_LIT>'):<EOL><INDENT>ibk = int(elt_subdomain.get('<STR_LIT:Name>').startswith('<STR_LIT>'))<EOL>if position:<EOL><INDENT>for data_attr in elt_subdomain.findall('<STR_LIT>'):<EOL><INDENT>for data_item, axis in zip(data_attr.findall('<STR_LIT>'),<EOL>'<STR_LIT>'):<EOL><INDENT>icore, data = _get_field(xdmf_file, data_item)<EOL>tra[axis][ibk][icore] = data<EOL><DEDENT><DEDENT><DEDENT>for data_attr in elt_subdomain.findall('<STR_LIT>'):<EOL><INDENT>if data_attr.get('<STR_LIT:Name>') != infoname:<EOL><INDENT>continue<EOL><DEDENT>icore, data = _get_field(xdmf_file, data_attr.find('<STR_LIT>'))<EOL>tra[infoname][ibk][icore] = data<EOL><DEDENT><DEDENT>for info in tra:<EOL><INDENT>tra[info] = [trab for trab in tra[info] if trab]  <EOL>for iblk, trab in enumerate(tra[info]):<EOL><INDENT>tra[info][iblk] = np.concatenate([trab[icore]<EOL>for icore in range(len(trab))])<EOL><DEDENT><DEDENT>return tra<EOL>
Extract tracers data from hdf5 files.

    Args:
        xdmf_file (:class:`pathlib.Path`): path of the xdmf file.
        infoname (str): name of information to extract.
        snapshot (int): snapshot number.
        position (bool): whether to extract position of tracers.
    Returns:
        dict of list of numpy.array:
            Tracers data organized by attribute and block.