def __init__(self, etype, entity_id, attrs=dict()):
        """Create Entity."""

        if etype not in Entity.ENTITY_TYPES:
            raise ValueError("Invalid entity type: " + etype)
        self.entity_id = entity_id
        self.etype = etype
        self.attrs = attrs
def __init__ ( self , etype , entity_id , attrs = dict ( ) ) : if etype not in Entity . ENTITY_TYPES : raise ValueError ( "Invalid entity type: " + etype ) self . entity_id = entity_id self . etype = etype self . attrs = attrs
Create Entity.