code: def make_status(
      stage: str,
      message: Optional[str] = None,
      reason: Optional[str] = None,
  ):
      status = {
          "stage": stage,
          "timestamp": datetime.now(tz=timezone.utc).timestamp(),
      }
      if message:
          status["message"] = message
      if reason:
          status["reason"] = reason
      return status
  
file_path: pytorch-lightning/src/lightning/app/utilities/enum.py
imports: import enum
  from datetime import datetime, timezone
  from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: make_status(stage, message, reason) and returns: status