<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_report(self, report, pass_count, fail_count):
 """Write a report status of Batch Runner. For convenience, the name will use current time. :param report: A list of each scenario and its status. :type report: list :param pass_count: Number of passing scenarios. :type pass_count: int :param fail_count: Number of failed scenarios. :type fail_count: int :returns: A string containing the path to the report file. :rtype: str :raises: IOError """

        separator = '-----------------------------\n'
        current_time = datetime.now().strftime('%Y%m%d%H%M%S')
        report_path = 'batch-report-' + current_time + '.txt'
        output_path = self.output_directory.text()
        path = os.path.join(output_path, report_path)

        try:
            report_file = open(path, 'w')
            report_file.write('InaSAFE Batch Report File\n')
            report_file.write(separator)
            for myLine in report:
                report_file.write(myLine)
            report_file.write(separator)
            report_file.write('Total passed: %s\n' % pass_count)
            report_file.write('Total failed: %s\n' % fail_count)
            report_file.write('Total tasks: %s\n' % len(report))
            report_file.write(separator)
            report_file.close()

            # LOGGER.info('Log written to %s' % path)
            return path
        except IOError:
            raise IOError