input: Write a python function to extract video data including videoId, title, description, and preview from a video dictionary.
  assert extract_video_data({'id': {'videoId': 'abc123'}, 'snippet': {'title': 'Test Video', 'description': 'This is a test video.', 'thumbnails': {'default': {'url': 'http://example.com/default.jpg'}}}}) == {'videoId': 'abc123', 'title': 'Test Video', 'description': 'This is a test video.', 'preview': 'http://example.com/default.jpg'}
  assert extract_video_data({'id': {'videoId': 'xyz456'}, 'snippet': {'title': 'Another Video', 'description': 'This is another test video.', 'thumbnails': {'high': {'url': 'http://example.com/high.jpg'}}}}) == {'videoId': 'xyz456', 'title': 'Another Video', 'description': 'This is another test video.', 'preview': 'http://example.com/high.jpg'}
  assert extract_video_data({'id': {'videoId': 'lmn789'}, 'snippet': {'title': 'Yet Another Video', 'description': 'This is yet another test video.', 'thumbnails': {}}}) == {'videoId': 'lmn789', 'title': 'Yet Another Video', 'description': 'This is yet another test video.', 'preview': ''}
output: def extract_video_data(video_dict):
      videoId = video_dict.get('id', {}).get('videoId', '')
      title = video_dict.get('snippet', {}).get('title', '')
      description = video_dict.get('snippet', {}).get('description', '')
      thumbnails = video_dict.get('snippet', {}).get('thumbnails', {})
      preview = ''
      
      if 'default' in thumbnails:
          preview = thumbnails['default'].get('url', '')
      elif 'high' in thumbnails:
          preview = thumbnails['high'].get('url', '')
      
      return {
          'videoId': videoId,
          'title': title,
          'description': description,
          'preview': preview
      }