code: def _maybe_create_cloud_compute(
      state: Dict,
  ) -> Union[CloudCompute, Dict]:
      if state and state.get("type") == __CLOUD_COMPUTE_IDENTIFIER__:
          return CloudCompute.from_dict(state)
      return state
  
file_path: pytorch-lightning/src/lightning/app/utilities/packaging/cloud_compute.py
imports: from dataclasses import asdict, dataclass
  from typing import Dict, List, Optional, Tuple, Union
  from uuid import uuid4
  from lightning.app.core.constants import ENABLE_MULTIPLE_WORKS_IN_NON_DEFAULT_CONTAINER, enable_interruptible_works
  from lightning.app.storage.mount import Mount
label_desc: Use image node_id 2 for calling a global function with example usage: _maybe_create_cloud_compute(state) and returns: state, CloudCompute