code: def check_initialized(inst):
      """Check if a ParallelProcessing instance is initialized properly."""
      if not inst.__initialized__:
          msg = (
              "ParallelProcessing is not initialized. Call "
              "'initialize' before calling 'fit'."
          )
          raise ParallelProcessingError(msg)
  
      if getattr(inst, "__fitted__", None):
          if inst.layers.raise_on_exception:
              raise ParallelProcessingError(
                  "This instance is already "
                  "fitted and its parallel "
                  "processing jobs has not been "
                  "terminated. To refit "
                  "instance, call 'terminate' "
                  "before calling 'fit'."
              )
          else:
              warnings.warn(
                  "This instance is already "
                  "fitted and its parallel "
                  "processing job has not been "
                  "terminated. Will refit using previous job's cache.",
                  ParallelProcessingWarning,
              )
  
imports: import warnings
  from .exceptions import NotFittedError, LayerSpecificationWarning, LayerSpecificationError, ParallelProcessingError, ParallelProcessingWarning
label_desc: Use image node_id 6 for calling a global function with example usage: check_initialized(inst) without return types