def convert(self, value, op):
        # Don't cast None
        if value is None:
            if not self.nullable:
                raise ValueError('Must not be null!')
            return None

        elif isinstance(self.type, Model) and isinstance(value, dict):
            return marshal(value, self.type)

        # and check if we're expecting a filestorage and haven't overridden `type`
        # (required because the below instantiation isn't valid for FileStorage)
        elif isinstance(value, FileStorage) and self.type == FileStorage:
            return value

        try:
            return self.type(value, self.name, op)
        except __HOLE__:
            try:
                if self.type is decimal.Decimal:
                    return self.type(str(value), self.name)
                else:
                    return self.type(value, self.name)
            except TypeError:
                return self.type(value)
dataset/ETHPy150Open noirbizarre/flask-restplus/flask_restplus/reqparse.py/Argument.convert