def write_file(self, fileobject, skip_unknown=False):
        self.set_metadata_version()

        for field in _version2fieldlist(self['Metadata-Version']):
            values = self.get(field)
            if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']):
                continue
            if field in _ELEMENTSFIELD:
                self._write_field(fileobject, field, ','.join(values))
                continue
            if field not in _LISTFIELDS:
                if field == 'Description':
                    values = values.replace('\n', '\n       |')
                values = [values]

            if field in _LISTTUPLEFIELDS:
                values = [','.join(value) for value in values]

            for value in values:
                self._write_field(fileobject, field, value)
Return top federal grants and contracts received.
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/_vendor/distlib/metadata.py/LegacyMetadata.write_file--crossover with--dataset/ETHPy150Open sunlightlabs/python-transparencydata/influenceexplorer.py/Organization.fed_spending