def METHOD_NAME(fh, field, data):
    r"""Save a YTArray to an open hdf5 file or group.
    Save a YTArray to an open hdf5 file or group, and save the
    units to a "units" attribute.
    Parameters
    ----------
    fh : an open hdf5 file or hdf5 group
        The hdf5 file or group to which the data will be written.
    field : str
        The name of the field to be saved.
    data : YTArray
        The data array to be saved.
    Returns
    -------
    dataset : hdf5 dataset
        The created hdf5 dataset.
    """
    dataset = fh.create_dataset(str(field), data=data)
    units = ""
    if isinstance(data, YTArray):
        units = str(data.units)
    dataset.attrs["units"] = units
    return dataset