def METHOD_NAME(n, admin_client, entry_name=None):
    # We need an entry in the schedule to create TRs for
    try:
        entry = ScheduleEntry.objects.get(name=entry_name)
    except Exception:
        test_entry = TEST_SCHEDULE_ENTRY
        if entry_name is not None:
            test_entry["name"] = entry_name
        rjson = post_schedule(admin_client, test_entry)
        entry_name = rjson["name"]
        entry = ScheduleEntry.objects.get(name=entry_name)
    for i in range(n):
        started = timezone.now()
        tr = TaskResult(
            schedule_entry=entry,
            task_id=i + 1,
            started=started,
            finished=started + ONE_MICROSECOND,
            duration=ONE_MICROSECOND,
            status="success",
            detail="",
        )
        tr.max_disk_usage = TEST_MAX_DISK_USAGE
        tr.save()
    return entry_name