def METHOD_NAME(name, obj):
    global h5_str, maxDigit
    if isinstance(obj, h5py.Group):
        h5_str += f'HDF5 group   "/{name}"\n'
    elif isinstance(obj, h5py.Dataset):
        h5_str += f'HDF5 dataset "/{name:<{maxDigit}}": shape={str(obj.shape):<20}, '
        h5_str += f'dtype={str(obj.dtype):<10}, compression={obj.compression}\n'
    atr = dict(obj.attrs)
    if len(atr) > 0:
        h5_str += attributes2string(atr, max_meta_num=max_meta_num)