def METHOD_NAME(self, record, obj):
    """Set the access object."""
    # We accept both dicts and access class objects.
    if isinstance(obj, dict):
        obj = self._access_obj_class.from_dict(obj)
    assert isinstance(obj, self._access_obj_class)
    # We do not dump the object until the pre_commit hook
    # I.e. record.access != record['access']
    self._set_cache(record, obj)