code: def on_train_end(self):
      assert self.called["training_step"] == 10
      assert self.called["on_train_batch_start"] == 10
      assert self.called["on_train_batch_end"] == 10
  
imports: import collections
  import contextlib
  from copy import deepcopy
  from unittest import mock
  from unittest.mock import ANY, call, patch
  import pytest
  import torch
  import torch.distributed
  import torch.nn.functional
  from lightning.fabric.utilities.exceptions import MisconfigurationException
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.pytorch import Trainer, seed_everything
  from lightning.pytorch.demos.boring_classes import BoringModel, ManualOptimBoringModel
  from lightning.pytorch.strategies import Strategy
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 6 for calling the ManualOptimizationExtendedModel obj's underlying member method code with example usage: obj.on_train_end() without return types