<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def listext(self, ext, stream=sys.stdout):
 """ Print to the given `stream` a table with the list of the output files with the given `ext` produced by the flow. """

        nodes_files = []
        for node in self.iflat_nodes():
            filepath = node.outdir.has_abiext(ext)
            if filepath:
                nodes_files.append((node, File(filepath)))

        if nodes_files:
            print("Found %s files with extension `%s` produced by the flow" % (len(nodes_files), ext), file=stream)

            table = [[f.relpath, "%.2f" % (f.get_stat().st_size / 1024**2),
                      node.node_id, node.__class__.__name__]
                     for node, f in nodes_files]
            print(tabulate(table, headers=["File", "Size [Mb]", "Node_ID", "Node Class"]), file=stream)

        else:
            print("No output file with extension %s has been produced by the flow" % ext, file=stream)