code: def on_epoch(self) -> bool:
      return self in (self.EPOCH, self.BATCH_AND_EPOCH)
  
file_path: pytorch-lightning/src/lightning/pytorch/callbacks/prediction_writer.py
imports: from typing import Any, Literal, Optional, Sequence
  from typing_extensions import override
  import lightning.pytorch
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.utilities import LightningEnum
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.signature_utils import is_param_in_hook_signature
label_desc: Use image node_id 2 for calling the WriteInterval obj's underlying member method code with example usage: obj.on_epoch() and returns: unknown