def get_operation_class(type_):
    assert isinstance(type_, ValueConstant)
    if not hasattr(get_operation_class, "cache"):
        get_operation_class.cache = {}
    if type_.value not in get_operation_class.cache:
        get_operation_class.cache[type_.value] = namedObject(
            "smartanthill.device.operation.%s.Operation" % type_.name.lower())
    return get_operation_class.cache[type_.value]
dataset/ETHPy150Open smartanthill/smartanthill1_0/smartanthill/device/operation/base.py/get_operation_class/original