<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_passenger_cpu_usage(self, dict_stats):
 """ Execute % top; and return STDOUT. """

        try:
            proc1 = subprocess.Popen(
                ["top", "-b", "-n", "2"],
                stdout=subprocess.PIPE)
            (std_out, std_err) = proc1.communicate()
        except OSError:
            return (-1)

        re_lspaces = re.compile("^\s*")
        re_digit = re.compile("^\d")
        overall_cpu = 0
        for raw_line in std_out.splitlines():
            line = re_lspaces.sub("", raw_line)
            if not re_digit.match(line):
                continue

            line_splitted = line.split()
            if line_splitted[0] in dict_stats["apache_procs"]:
                overall_cpu += float(line_splitted[8])
            elif line_splitted[0] in dict_stats["nginx_procs"]:
                overall_cpu += float(line_splitted[8])
            elif line_splitted[0] in dict_stats["passenger_procs"]:
                overall_cpu += float(line_splitted[8])

        return overall_cpu