<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_csv(self, delim=',', qu='"'):
 """ Prepares the data in CSV format """

        res = qu + self.name + qu + delim
        if self.data:
            for d in self.data:
                res += qu + str(d) + qu + delim
        return res + '\n'