def METHOD_NAME(bot: Text, log_type: Text, reference_id: Text = None, status: Text = None, **kwargs):
    try:
        if log_type in {MessageBroadcastLogType.send.value, MessageBroadcastLogType.self.value}:
            raise DoesNotExist()
        log = MessageBroadcastLogs.objects(bot=bot, reference_id=reference_id, log_type=log_type).get()
    except DoesNotExist:
        if not reference_id:
            reference_id = ObjectId().__str__()
        log = MessageBroadcastLogs(bot=bot, reference_id=reference_id, log_type=log_type)
    if status:
        log.status = status
    for key, value in kwargs.items():
        if not getattr(log, key, None) and Utility.is_picklable_for_mongo({key: value}):
            setattr(log, key, value)
    log.save()
    return reference_id