'dn
string-representation of distinguished name
record
Either a dictionary holding the LDAP entry {attrtype:record}
or a list with a modify list like for LDAPObject.modify().'

def unparse(self, dn, record):

    if (not record):
        return
    self._unparseAttrTypeandValue('dn', dn)
    if isinstance(record, types.DictType):
        self._unparseEntryRecord(record)
    elif isinstance(record, types.ListType):
        self._unparseChangeRecord(record)
    else:
        raise ValueError, 'Argument    record    must    be    dictionary    or    list'
    self._output_file.write(self._line_sep)
    self.records_written = (self.records_written + 1)
    return
