code: def check_checkout_is_clean(
      config: Config, system: System
  ) -> ActionReturn:
      try:
          extras = system.run("git status --porcelain").split("\n")
          extras = [x for x in extras if x != ""]
          if extras:
              return FAILED("Local checkout is NOT clean", extras)
          else:
              return PASSED("Local checkout is clean")
      except RuntimeError as e:
          return FAILED(
              "Could not check the checkout state", details=e.args
          )
  
imports: from __future__ import annotations
  import json
  import os
  from pathlib import Path
  from packaging.version import Version
  from .action import FAILED, PASSED, ActionReturn
  from .config import Config
  from .pipeline import StepType
  from .system import System
  from .util import skip_for_prerelease
label_desc: Use image node_id 5 for calling a global function with example usage: check_checkout_is_clean(config, system) and returns: FAILED, PASSED, FAILED