class_docstr: A language translator and detector.
  
  Usage:
  ::
      >>> from textblob.translate import Translator
      >>> t = Translator()
      >>> t.translate('hello', from_lang='en', to_lang='fr')
      u'bonjour'
      >>> t.detect("hola")
      u'es'
class_docstr_tok: ["A","language","translator","and","detector",".","Usage",":",":",":",">",">",">","from","textblob.translate","import","Translator",">",">",">","t","=","Translator","(",")",">",">",">","t.translate","(","'hello","'",",","from_lang='en","'",",","to_lang='fr","'",")","u'bonjour'",">",">",">","t.detect","(","``","hola","''",")","u'es","'"]
docstr: Validate API returned expected schema, and that the translated text
  is different than the original string.
docstr_tok: ["Validate","API","returned","expected","schema",",","and","that","the","translated","text","is","different","than","the","original","string","."]
code: def _validate_translation(self, source, result):
      """Validate API returned expected schema, and that the translated text
      is different than the original string.
      """
      if not result:
          raise NotTranslated(
              "Translation API returned and empty response."
          )
      if PY2:
          result = result.encode("utf-8")
      if result.strip() == source.strip():
          raise NotTranslated(
              "Translation API returned the input string unchanged."
          )
  
file_path: TextBlob/textblob/translate.py
imports: from __future__ import absolute_import
  import codecs
  import json
  import re
  from textblob.compat import PY2, request, urlencode
  from textblob.exceptions import TranslatorError, NotTranslated
label_desc: Use image node_id 3 for calling the Translator obj's underlying member method code with example usage: obj._validate_translation(source, result) without return types