code: def test_manual_result():
      training_step_output = {
          "loss": torch.tensor(25.0, requires_grad=True),
          "something": "jiraffe",
      }
      result = ManualResult.from_training_step_output(
          training_step_output
      )
      asdict = result.asdict()
      assert not asdict["loss"].requires_grad
      assert asdict["loss"] == 25
      assert result.extra == asdict
  
file_path: pytorch-lightning/tests/tests_pytorch/loops/optimization/test_manual_loop.py
imports: import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loops.optimization.manual import ManualResult
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
label_desc: Use image node_id 1 for calling a global function with example usage: test_manual_result() without return types