class_docstr: Logger to test all-rank logging (i.e. not just rank 0).
  
  Logs are saved to local variable `logs`.
class_docstr_tok: ["Logger","to","test","all-rank","logging","(","i.e",".","not","just","rank","0",")",".","Logs","are","saved","to","local","variable","`","logs","`","."]
code: def experiment(self) -> Any:
      return self.exp
  
imports: import os
  from typing import Any, Dict, Optional, Union
  from unittest.mock import Mock
  import lightning.pytorch
  from lightning.pytorch import Callback, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers.logger import Logger
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 2 for calling the AllRankLogger obj's underlying member method code with example usage: obj.experiment() and returns: self