def METHOD_NAME():
    """
    Clean expired sessions from the database.
    采用小批量删除方式，防止存量数据过大的情况
    """
    logger.info("Start clean django sessions...")
    start_time = time.time()
    try:
        max_clean_num = settings.MAX_EXPIRED_SESSION_CLEAN_NUM
        session_keys = list(
            Session.objects.filter(expire_date__lt=timezone.now()).values_list("session_key", flat=True)[:max_clean_num]
        )
        result = Session.objects.filter(session_key__in=session_keys).delete()
        logger.info(f"Clean django sessions result: {result}, cost time: {time.time() - start_time}")
    except Exception as e:
        logger.exception(f"Clean django sessions error: {e}")