you need to change it to pad_value = args[1] and check isinstance(pad_value, Constant) so that you can get the numeric value of pad value
pad_value = args[1]
isinstance(pad_value, Constant)