def get_nifti1hdr_from_h5attrs(h5attrs):
hdr = nib.Nifti1Header()<EOL>for k in list(h5attrs.keys()):<EOL><INDENT>hdr[str(k)] = np.array(h5attrs[k])<EOL><DEDENT>return hdr<EOL>
Transforms an H5py Attributes set to a dict.
    Converts unicode string keys into standard strings
    and each value into a numpy array.

    Parameters
    ----------
    h5attrs: H5py Attributes

    Returns
    --------
    dict