def datacite_dict_mapper(datacite, form, mapping):
    """Map DataCite metadata to form fields based on a mapping."""
    for func_name, field_name in mapping.items():
        setattr(form, field_name, getattr(datacite, func_name)())
