<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self, stream=sys.stdout, dry_run=False, stage_files=True, resubmit_failed=False):
 """Runs this `Chain`. Parameters stream : `file` Stream that this `Link` will print to, Must have 'write' function dry_run : bool Print command but do not run it. stage_files : bool Copy files to and from scratch staging area. resubmit_failed : bool Flag for sub-classes to resubmit failed jobs. """

        self._run_chain(stream, dry_run, stage_files,
                        resubmit_failed=resubmit_failed)