code: def evaluate_can_run_job(
      job_id: UID, job_stash: JobStash, credentials: SyftVerifyKey
  ) -> Result[Job, str]:
      """Evaluate if a Job can be executed by the user.
  
      A Job cannot be executed if any of the following are met:
      - User doesn't have permission to the job.
      - Job is either marked Completed or result is available.
      - Job is Cancelled or Interrupted.
      """
      res = job_stash.get_by_uid(credentials, job_id)
  
      # User doesn't have access to job
      if res.is_err():
          return res
  
      job_item = res.ok()
  
      if job_item.status == JobStatus.COMPLETED or job_item.resolved:
          return Err(f"Job: {job_id} already Completed.")
      elif job_item.status == JobStatus.INTERRUPTED:
          return Err(f"Job interrupted. Job Id: {job_id}")
  
      return Ok(job_item)
  
imports: import multiprocessing
  import threading
  import time
  from typing import Any
  from typing import Optional
  from typing import Type
  from typing import Union
  import psutil
  from result import Err
  from result import Ok
  from result import Result
  from ...node.credentials import SyftVerifyKey
  from ...serde.deserialize import _deserialize
  from ...serde.serializable import serializable
  from ...service.context import AuthedServiceContext
  from ...types.datetime import DateTime
  from ...types.uid import UID
  from ..job.job_stash import Job
  from ..job.job_stash import JobStash
  from ..job.job_stash import JobStatus
  from ..response import SyftError
  from ..response import SyftSuccess
  from ..worker.worker_stash import WorkerStash
  from .base_queue import AbstractMessageHandler
  from .base_queue import BaseQueueManager
  from .base_queue import QueueConfig
  from .base_queue import QueueConsumer
  from .base_queue import QueueProducer
  from .queue_stash import QueueItem
  from .queue_stash import Status
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate_can_run_job(job_id, job_stash, credentials) and returns: Ok, res, Err, Err