def dump_entry(entry, ret='\n'):
    """Dump entry object

    Arguments:
        entry -- entry object
        ret   -- return code

    Returns:
        Return entry string.
    """
    lines = []
    queue = ['dn', 'objectclass']
    tags = [key for key in entry.keys()
            if key != 'dn' and key != 'objectclass']
    tags.sort()
    lines.append(': '.join(['dn', entry['dn']]))
    for oc in entry['objectclass']:
        lines.append(': '.join(['objectclass', oc]))
    for tag in tags:
        lines.append(': '.join([tag, entry[tag]]))
    lines.append('')

    return ret.join(lines)