def clean_messages(sender, **kwargs):
    '''
    If there are no more users for this message, delete it from
    the database.
    '''
    if kwargs['created'] == False:
        if kwargs['instance'].users.count() == 0:
            kwargs['instance'].delete()
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/messaging/models.py/clean_messages/original