def METHOD_NAME(
    cls,
    actor,
    verb,
    template,
    subsystem=None,
    object=None,
    target=None,
    before=None,
    after=None,
):
    """LogEntry factory"""
    self = cls()
    dict = {'actor': actor, 'object': object, 'target': target}
    for k, v in dict.items():
        dict[k] = getattr(v, 'audit_logname', u'%s' % v)
    try:
        self.summary = template.format(**dict)
    except KeyError as error:
        self.summary = 'Error creating summary - see error log'
        _logger.error('KeyError when creating summary: %s', error)
    self.verb = verb
    self.actor_model = find_modelname(actor)
    self.object_model = find_modelname(object) if object else None
    self.target_model = find_modelname(target) if target else None
    self.actor_pk = actor.pk
    self.object_pk = object.pk if object else None
    self.target_pk = target.pk if target else None
    self.timestamp = utcnow()
    self.subsystem = subsystem if subsystem else None
    self.before = force_str(before)
    self.after = force_str(after)
    self.save()
    return self