def METHOD_NAME(cube, new_metadata, element, monitor):
    for key in new_metadata[element].keys():
        if key in _NO_MANUAL_EDIT:
            monitor(f'"{key}" is not updated in the global attributes of the xcube dataset. '
                    f'Please use "--coords" for updating coordinate information.')
        else:
            cube.attrs.update({key: new_metadata[element][key]})
            if 'output_metadata' in element:
                monitor(f'Updated "{key}" in the global attributes of the xcube dataset.')
            else:
                monitor(f'Updated "{key}" in the attributes of "{element}" in the xcube dataset.')