def __lshift__(self, other):
        """Override << operator"""
        if not isinstance(other, (ItemData, Annotation, Signature)):
            raise ValueError("ItemGroupData object can only receive ItemData, Signature or Annotation objects")

        self.set_list_attribute(other, Annotation, 'annotations')
        self.set_single_attribute(other, Signature, 'signature')
        if isinstance(other, ItemData):
            if other.itemoid in self.items:
                raise ValueError("ItemGroupData object with that itemoid is already in the ItemGroupData object")
            self.items[other.itemoid] = other
        return other
def __lshift__ ( self , other ) : if not isinstance ( other , ( ItemData , Annotation , Signature ) ) : raise ValueError ( "ItemGroupData object can only receive ItemData, Signature or Annotation objects" ) self . set_list_attribute ( other , Annotation , 'annotations' ) self . set_single_attribute ( other , Signature , 'signature' ) if isinstance ( other , ItemData ) : if other . itemoid in self . items : raise ValueError ( "ItemGroupData object with that itemoid is already in the ItemGroupData object" ) self . items [ other . itemoid ] = other return other
Override << operator