def convert(self, value, param, ctx):
        # Split the column definition up
        column_properties = value.split(':')

        # Extract and validate the column name
        name = column_properties[0]
        if not valid_underscore_name(name):
            ctx.fail('The name provided is not a valid variable name')

        # Extract and validate the column type and length
        try:
            type_properties = column_properties[1].split(',')
            type = type_properties[0].lower() or COLUMN_TYPE_DEFAULT
        except IndexError:
            type_properties = []
            type = COLUMN_TYPE_DEFAULT

        if type not in COLUMN_TYPE_MAPPING:
            ctx.fail('The type specified for column %s is invalid' % name)

        try:
            if type_properties[1]:
                length = int(type_properties[1])
            else:
                length = None
        except IndexError:
            length = None
        except ValueError:
            ctx.fail('The length specified for column %s is invalid' % name)

        if length and type not in COLUMN_TYPES_SUPPORTING_LENGTH:
            ctx.fail(
                'The length specified for column %s is not allowed for %s '
                'types' % (name, type)
            )

        # Extract and validate the column modifiers
        try:
            modifiers = column_properties[2].lower().split(',')
        except IndexError:
            modifiers = []

        for modifier in modifiers:
            if modifier not in COLUMN_MODIFIER_MAPPING:
                ctx.fail(
                    'The column modifier %s for column %s is invalid' %
                    (modifier, name)
                )

        return name, type, length, modifiers
dataset/ETHPy150Open fgimian/flaskage/flaskage/helpers.py/ModelColumnParamType.convert/original