def remove_non_datastore_keys(form_data):
    """Remove keys not relevant to creating a datastore object."""
    form_dict = {k: v[0] for k, v in form_data.items()}

    for key in ["csrfmiddlewaretoken", "name", "type", "owner"]:
        form_dict.pop(key, None)

    return form_dict