input: Write a python function to list available V4L2 devices and return their names and persistent device paths.
  assert list_devices() == [('/dev/video0', '/dev/v4l/by-id/usb-046d_Logitech_Webcam_C930e_8AB8BF4F-video-index0', 'Logitech Webcam C930e')]
  assert list_devices() == [('/dev/video1', '/dev/v4l/by-id/usb-046d_Logitech_Webcam_C925e_12345678-video-index0', 'Logitech Webcam C925e')]
output: import os
  
  def list_devices():
      devices = []
      v4l_path = '/dev/v4l/by-id'
      if os.path.exists(v4l_path):
          for entry in os.listdir(v4l_path):
              if 'video' in entry:
                  persistent_path = os.path.join(v4l_path, entry)
                  device_path = os.path.realpath(persistent_path)
                  device_name = entry.split('_')[2]
                  devices.append((device_path, persistent_path, device_name))
      return devices