def METHOD_NAME(self):
    kwargs = {
        "instance_id": pipeline.id,
        "project_id": taskflow.project.id,
        "category": tasktmpl.category,
        "template_id": tasktmpl.pipeline_template.id,
        "task_template_id": tasktmpl.id,
        "creator": pipeline.creator,
        "create_time": pipeline.create_time,
        "start_time": pipeline.start_time,
        "finish_time": pipeline.finish_time,
        "elapsed_time": 0,
        "create_method": taskflow.create_method,
        "gateways_total": 1,
        "subprocess_total": 1,
        "atom_total": 1,
    }
    result = taskflowinstance_post_save_statistics_task(TEST_TASK_INSTANCE_ID, False)
    TaskFlowInstance.objects.get.assert_called_once_with(id=taskflow.id)
    TaskTemplate.objects.get.assert_called_once_with(id=tasktmpl.id)
    TaskflowStatistics.objects.update.assert_called_once_with(
        task_instance_id=TEST_TASK_INSTANCE_ID, defaults=kwargs
    )
    self.assertTrue(result)