'Returns a string representation of this beacon information object.
The beacons are sorted by their identifier.
@return: The string representation.
@rtype: C{str}'

def __repr__(self):

    sortedBeacons = partial(sorted, key=attrgetter('identifier'))
    usedBeacons = sortedBeacons(self.usedBeacons)
    unusedBeacons = sortedBeacons((self.seenBeacons - self.usedBeacons))
    template = '<BeaconInformation    (used    beacons    ({numUsed}):    {usedBeacons},    unused    beacons:    {unusedBeacons})>'
    formatted = template.format(numUsed=len(self.usedBeacons), usedBeacons=usedBeacons, unusedBeacons=unusedBeacons)
    return formatted
