<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _pre_run_checks(self, stream=sys.stdout, dry_run=False):
 """Do some checks before running this link This checks if input and output files are present. If input files are missing this will raise `OSError` if dry_run is False If all output files are present this return False. Parameters stream : `file` Stream that this function will print to, Must have 'write' function dry_run : bool Print command but do not run it Returns ------- status : bool True if it is ok to proceed with running the link """

        input_missing = self.check_input_files(return_found=False)
        if input_missing:
            if dry_run:                
                stream.write("Input files are missing: %s: %i\n" %
                             (self.linkname, len(input_missing)))
            else:
                print (self.args)
                raise OSError("Input files are missing: %s" % input_missing)

        output_found, output_missing = self.check_output_files()
        if output_found and not output_missing:
            stream.write("All output files for %s already exist: %i %i %i\n" %
                         (self.linkname, len(output_found),
                          len(output_missing), len(self.files.output_files)))
            if dry_run:
                pass
            else:
                pass
                # return False
        return True