def METHOD_NAME(older_than_days: int) -> str:
    from .models import AgentHistory
    AgentHistory.objects.filter(
        time__lt=djangotime.now() - djangotime.timedelta(days=older_than_days)
    ).delete()
    return "ok"