<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_udev_info(self, device, attrs=False):
 """Collect udevadm info output for a given device :param device: A string or list of strings of device names or sysfs paths. E.G. either '/sys/class/scsi_host/host0' or '/dev/sda' is valid. :param attrs: If True, run udevadm with the --attribute-walk option. """

        udev_cmd = 'udevadm info'
        if attrs:
            udev_cmd += ' -a'

        if isinstance(device, six.string_types):
            device = [device]

        for dev in device:
            self._log_debug("collecting udev info for: %s" % dev)
            self._add_cmd_output('%s %s' % (udev_cmd, dev))