'Set the roster entries in the <roster> stanza.
Uses a dictionary using JIDs as keys, where each entry is itself
a dictionary that contains:
name         -- An alias or nickname for the JID.
subscription -- The subscription type. Can be one of \'to\',
\'from\', \'both\', \'none\', or \'remove\'.
groups       -- A list of group names to which the JID
has been assigned.
Arguments:
items -- A dictionary of roster entries.'

def set_items(self, items):

    self.del_items()
    for jid in items:
        item = RosterItem()
        item.values = items[jid]
        item['jid'] = jid
        self.append(item)
    return self
