<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(self, filename=None):
 """ Save an arff structure to a file. """

        filename = filename or self._filename
        o = open(filename, 'w')
        o.write(self.write())
        o.close()