def mock_device_with_vid_factory(mock_device):
    """
    Fixture that yields a function used to create mock USB devices with a specific vendor id.
    """
    def factory(vendor_id):
        mock_device.getVendorID.return_value = vendor_id
        return mock_device

    return factory