def METHOD_NAME(parameters, item):
    name = item.name()
    import re
    nameList = re.split(r"[^a-zA-Z0-9]", item.name().title())
    if hasattr(item, 'value'):
        set_attr = 'set' + ''.join(nameList)
        get_attr = nameList[0].lower()
        if len(nameList) > 1:
            get_attr += ''.join(nameList[1:])
        def setValue(self, *argv):
            index = 0
            if len(argv) > 1:
                index = argv[0]
            return self.find(name).setValue(index, argv[-1])
        bind(parameters, set_attr, setValue)
        def value(self, index=0):
            return self.find(name).value(index)
        bind(parameters, get_attr, value)
    if item.isOptional():
        enable_attr = 'enable' + ''.join(nameList)
        enabled_attr = nameList[0].lower()
        if len(nameList) > 1:
            enabled_attr += ''.join(nameList[1:])
        enabled_attr += 'Enabled'
        def enable(self, choice):
            return self.find(name).setIsEnabled(choice)
        bind(parameters, enable_attr, enable)
        def isEnabled(self):
            return self.find(name).isEnabled()
        bind(parameters, enabled_attr, isEnabled)
    if hasattr(item, 'isDiscrete'):
        setindex_attr = 'set' + ''.join(nameList) + 'Index'
        def setDiscreteIndex(self, index, value):
            return self.find(name).setDiscreteIndex(index, value)
        bind(parameters, setindex_attr, setDiscreteIndex)
        getindex_attr = nameList[0].lower()
        if len(nameList) > 1:
            getindex_attr += ''.join(nameList[1:])
        getindex_attr += "Index"
        def discreteIndex(self, index):
            return self.find(name).discreteIndex(index)
        bind(parameters, getindex_attr, discreteIndex)