code: def check_extension(cls, ext):
          
          if ext.startswith('.'):
              ext = ext[1:]
          if not any(ext in extension for extension in cls.supported_extensions):
              msg = ("Invalid extension for engine '{engine}': '{ext}'"
                     .format(engine=pprint_thing(cls.engine),
                             ext=pprint_thing(ext)))
              raise ValueError(msg)
          else:
              return True
docs: checks that path's extension against the Writer's supported
          extensions.  If it isn't supported, raises UnsupportedFiletypeError.