def METHOD_NAME(self, after, before, created, expected_state):
    """
    Test that tasks created outside the window of dates don't get changed,
    while tasks created in the window do get changed.
    Verifies that tasks in other states never get changed.
    """
    self.update_task_created(created)
    call_command('fail_old_tasks', QUEUING, before=before, after=after)
    type_1_queueing, type_1_progress, type_2_queueing = self.get_tasks()
    assert type_1_queueing.task_state == expected_state
    assert type_2_queueing.task_state == expected_state
    assert type_1_progress.task_state == PROGRESS