calculates the bnode id for the class

def bnode_id(self):
        """
        calculates the bnode id for the class
        """
        if self.subject.type != 'bnode':
            return self.subject
        rtn_list = []
        for prop in sorted(self):
            for value in sorted(self[prop]):
                rtn_list.append("%s%s" % (prop, value))
        return sha1("".join(rtn_list).encode()).hexdigest()