<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Parse(self, cmd, args, stdout, stderr, return_val, time_taken, knowledge_base):
 """Parse the ps output. Note that cmdline consumes every field up to the end of line and as it is string, we can't perfectly see what the arguments on the command line really were. We just assume a space is the arg seperator. It's imperfect, but it's better than nothing. Obviously, if cmd/cmdline is specified, it must be the last column of output. Args: cmd: A string containing the base command that was run. args: A list of strings containing the commandline args for the command. stdout: A string containing the stdout of the command run. stderr: A string containing the stderr of the command run. (Unused) return_val: The return code following command execution. time_taken: The time taken to run the process. (Unused) knowledge_base: An RDF KnowledgeBase. (Unused) Yields: RDF Process objects. """


    _ = stderr, time_taken, knowledge_base  # Unused.
    self.CheckReturn(cmd, return_val)

    lines = stdout.splitlines()[1:]  # First line is just a header.
    for line in lines:
      try:
        uid, pid, ppid, c, _, tty, _, cmd = line.split(None, 7)

        rdf_process = rdf_client.Process()
        rdf_process.username = uid
        rdf_process.pid = int(pid)
        rdf_process.ppid = int(ppid)
        rdf_process.cpu_percent = float(c)
        rdf_process.terminal = tty
        rdf_process.cmdline = cmd.split()
        yield rdf_process
      except ValueError as error:
        message = "Error while parsing `ps` output line '%s': %s"
        logging.warning(message, line, error)