def METHOD_NAME(metric: CostMetric):
    if metric == CostMetric.memory:
        return pymo.COST_TYPE_MEMORY
    if metric == CostMetric.mac:
        return pymo.COST_TYPE_MAC
    raise AssertionError('Unknown cost metric')