@classmethod
def from_str(cls, mode):
    if (mode in cls._map):
        return cls._map[mode]
    else:
        raise ValueError('pruning_mode mode must be one of: {}. Found: {}'.format(', '.join(sorted(cls._map)), mode))
@classmethod
def from_str(cls, mode):
    if (mode in cls._map):
        return cls._map[mode]
    else:
        raise ValueError('pruning_mode mode must be one of: {}. Found: {}'.format(', '.join(sorted(cls._map)), mode))