def _update_tag_status(self, process, vals):
good_status = ["<STR_LIT>", "<STR_LIT>"]<EOL>for v in list(vals)[::-<NUM_LIT:1>]:<EOL><INDENT>p = self.processes[process]<EOL>tag = v["<STR_LIT>"]<EOL>if tag in p["<STR_LIT>"]:<EOL><INDENT>p["<STR_LIT>"].remove(tag)<EOL>if v["<STR_LIT:status>"] in good_status:<EOL><INDENT>p["<STR_LIT>"].add(tag)<EOL><DEDENT>elif v["<STR_LIT:status>"] == "<STR_LIT>":<EOL><INDENT>if not v["<STR_LIT>"]:<EOL><INDENT>v["<STR_LIT>"] = "<STR_LIT>"<EOL><DEDENT>self.process_tags[process][tag]["<STR_LIT>"] =self._retrieve_log(join(v["<STR_LIT>"], "<STR_LIT>"))<EOL>p["<STR_LIT>"].add(tag)<EOL><DEDENT><DEDENT>elif tag in p["<STR_LIT>"]:<EOL><INDENT>if v["<STR_LIT:status>"] in good_status:<EOL><INDENT>p["<STR_LIT>"].remove(tag)<EOL>p["<STR_LIT>"].remove(tag)<EOL>del self.process_tags[process][tag]["<STR_LIT>"]<EOL><DEDENT>elif self.run_status == "<STR_LIT>":<EOL><INDENT>p["<STR_LIT>"].remove(tag)<EOL><DEDENT><DEDENT>elif v["<STR_LIT:status>"] in good_status:<EOL><INDENT>p["<STR_LIT>"].add(tag)<EOL><DEDENT>if v["<STR_LIT:status>"] not in good_status:<EOL><INDENT>if v["<STR_LIT>"] in list(p["<STR_LIT>"]) + list(p["<STR_LIT>"]):<EOL><INDENT>vals.remove(v)<EOL><DEDENT><DEDENT><DEDENT>return vals<EOL>
Updates the 'submitted', 'finished', 'failed' and 'retry' status
        of each process/tag combination.

        Process/tag combinations provided to this method already appear on
        the trace file, so their submission status is updated based on their
        execution status from nextflow.

        For instance, if a tag is successfully
        complete, it is moved from the 'submitted' to the 'finished' list.
        If not, it is moved to the 'failed' list.

        Parameters
        ----------
        process : str
            Name of the current process. Must be present in attr:`processes`
        vals : list
            List of tags for this process that have been gathered in the
            trace file.