(self, x)
Called on a cost object to extract all costs of nested-multicosts, else return main cost.

        Arguments:
            x (Cost): cost object
Called on a cost object to extract all costs of nested-multicosts, else return main cost.
Called on a cost object to extract all costs of nested - multicosts else return main cost .
def multicost_recurse(self, x):
        """
        Called on a cost object to extract all costs of nested-multicosts, else return main cost.

        Arguments:
            x (Cost): cost object
        """
        # recurse into nested multicosts to grab all cost branches
        if type(x) == Multicost:
            return [z for z in map(self.multicost_recurse, x.costs)]
        else:
            return x.cost
def multicost_recurse ( self , x ) : # recurse into nested multicosts to grab all cost branches if type ( x ) == Multicost : return [ z for z in map ( self . multicost_recurse , x . costs ) ] else : return x . cost