<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auto_slug_after_insert(mapper, connection, target):
 """Generate a slug from entity_type and id, unless slug is already set."""

    if target.slug is None:
        target.slug = "{name}{sep}{id}".format(
            name=target.entity_class.lower(), sep=target.SLUG_SEPARATOR, id=target.id
        )