<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_case_data(self, file):
 """ Writes the case data in MATPOWER format. """

        file.write("function mpc = %s\n" % self._fcn_name)
        file.write('\n%%%% MATPOWER Case Format : Version %d\n' % 2)
        file.write("mpc.version = '%d';\n" % 2)

        file.write("\n%%%%-----  Power Flow Data  -----%%%%\n")
        file.write("%%%% system MVA base\n")
        file.write("%sbaseMVA = %g;\n" % (self._prefix, self.case.base_mva))