code: def validate_nb(nb):
      
      if nb['nbformat'] != 4:
          return False
  
      language_name = (nb.get('metadata', {})
          .get('kernelspec', {})
          .get('language', '').lower())
      return language_name == 'python'
docs: Validate that given notebook JSON is importable
  
      - Check for nbformat == 4
      - Check that language is python
  
      Do not re-implement nbformat here :D