def convert(self, argval):
        '''
        Given an argument to --filter of the form "<name>=<value>", convert
        the value to the appropriate type by calling self.type on it, then
        return a (name, converted_value) tuple.  If the value's type conversion
        doesn't work then an ArgumentTypeError will result.  If the conversion
        succeeds but does not appear in self.choices when it exists, an
        ArgumentTypeError will result as well.
        '''
        if '=' not in argval:
            msg = "filter '{0}' must have format 'NAME=VALUE'".format(argval)
            raise argparse.ArgumentTypeError(msg)
        (name, value_str) = argval.split('=', 1)
        try:
            value = self.type(value_str)
        except __HOLE__:
            msg = "{0} filter value '{1}' must have type {2}".format(
                name, value_str, self.type.__name__)
            raise argparse.ArgumentTypeError(msg)
        if self.choices and value not in self.choices:
            msg = "{0} filter value '{1}' must match one of {2}".format(
                name, value,
                ', '.join([str(choice) for choice in self.choices]))
            raise argparse.ArgumentTypeError(msg)
        if value == '':
            value = EMPTY
        return (name, value)
dataset/ETHPy150Open boto/requestbuilder/requestbuilder/__init__.py/Filter.convert