code: def write_branch_data(self, file):
          
          writer = self._get_writer(file)
          writer.writerow(BRANCH_ATTRS)
          for branch in self.case.branches:
              writer.writerow([getattr(branch, a) for a in BRANCH_ATTRS])
docs: Writes branch data as CSV.