<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_alive(self, extended_check=None):
 """Return a boolean indicating whether the process is running or not. :param func extended_check: An additional callable that will be invoked to perform an extended liveness check. This callable should take a single argument of a `psutil.Process` instance representing the context-local process and return a boolean True/False to indicate alive vs not alive. """

    try:
      process = self._as_process()
      return not (
        # Can happen if we don't find our pid.
        (not process) or
        # Check for walkers.
        (process.status() == psutil.STATUS_ZOMBIE) or
        # Check for stale pids.
        (self.process_name and self.process_name != process.name()) or
        # Extended checking.
        (extended_check and not extended_check(process))
      )
    except (psutil.NoSuchProcess, psutil.AccessDenied):
      # On some platforms, accessing attributes of a zombie'd Process results in NoSuchProcess.
      return False