def serialize(self):
        """
        Serialize the algorithm definition
        """
        # fill sequences
        for keys, groups in groupby(self.ports, lambda x: x.io_type):
            for seq, port in enumerate(groups):
                port.sequence = seq
        return super(AlgorithmDef, self).serialize()
def serialize ( self ) : for keys , groups in groupby ( self . ports , lambda x : x . io_type ) : for seq , port in enumerate ( groups ) : port . sequence = seq return super ( AlgorithmDef , self ) . serialize ( )
Serialize the algorithm definition