<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def kill_ghosts():
 """ Kill process from previous GNS3 session """

    detect_process = ["vpcs", "ubridge", "dynamips"]
    for proc in psutil.process_iter():
        try:
            name = proc.name().lower().split(".")[0]
            if name in detect_process:
                proc.kill()
                log.warning("Killed ghost process %s", name)
        except (psutil.NoSuchProcess, psutil.AccessDenied):
            pass