code: def num_buttons(self):
  		
  
  		num = self._libinput.libinput_device_tablet_pad_get_num_buttons(
  			self._handle)
  		if num < 0:
  			raise AttributeError('This device is not a tablet pad device')
  		return num
docs: The number of buttons on a device with
  		the :attr:`~libinput.constant.DeviceCapability.TABLET_PAD` capability.
  
  		Buttons on a pad device are numbered sequentially, see
  		`Tablet pad button numbers`_ for details.
  
  		Returns:
  			int: The number of buttons supported by the device.
  		Raises:
  			AttributeError