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

def multicost_recurse(self, x):

    if (type(x) == Multicost):
        return [z for z in map(self.multicost_recurse, x.costs)]
    else:
        return x.cost
