class_docstr: Performs automatic optimization (forward, zero grad, backward, optimizer step)
docstr: Performs the actual train step with the tied hooks.
  
  Args:
      kwargs: the kwargs passed down to the hooks.
  
  Returns:
      A ``ClosureResult`` containing the training step output.
code: def _training_step(self, kwargs: OrderedDict) -> ClosureResult:
      """Performs the actual train step with the tied hooks.
  
      Args:
          kwargs: the kwargs passed down to the hooks.
  
      Returns:
          A ``ClosureResult`` containing the training step output.
  
      """
      trainer = self.trainer
  
      # manually capture logged metrics
      training_step_output = call._call_strategy_hook(
          trainer, "training_step", *kwargs.values()
      )
      self.trainer.strategy.post_training_step()  # unused hook - call anyway for backward compatibility
  
      return self.output_result_cls.from_training_step_output(
          training_step_output, trainer.accumulate_grad_batches
      )
  
imports: from dataclasses import dataclass, field
  from functools import partial
  from typing import Any, Callable, Dict, Mapping, Optional, OrderedDict
  import torch
  from torch import Tensor
  from torch.optim import Optimizer
  from typing_extensions import override
  import lightning.pytorch
  from lightning.pytorch.loops.loop import _Loop
  from lightning.pytorch.loops.optimization.closure import AbstractClosure, OutputResult
  from lightning.pytorch.loops.progress import _OptimizationProgress
  from lightning.pytorch.loops.utilities import _block_parallel_sync_behavior
  from lightning.pytorch.trainer import call
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.rank_zero import WarningCache
  from lightning.pytorch.utilities.types import STEP_OUTPUT
label_desc: Use image node_id 10 for calling the _AutomaticOptimization obj's underlying member method code with example usage: obj._training_step(kwargs) and returns: self