code: def test_evaluate(self):
      for m in self.models:
          # Check evaluate on the training set returns an answer
          perp = m.evaluate(self.docs)
          self.assertTrue(isinstance(perp, dict))
          self.assertTrue(isinstance(perp["perplexity"], float))
  
          # Check that the answer is within 5% of the one reported
          # by the model during training.
          if "validation_perplexity" in m._list_fields():
              perp2 = m.validation_perplexity
          # TEMP: Disable since we now only compute this if validatino set is provided
          # assert abs(perp - perp2)/perp < .05
  
          # Check evaluate on the test set returns an answer
          perp = m.evaluate(self.docs, self.docs)
          self.assertTrue(isinstance(perp, dict))
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import tempfile
  import shutil
  import unittest
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits.topic_model import topic_model
  from turicreate.toolkits.text_analytics import parse_sparse
  from turicreate.toolkits.text_analytics import parse_docword
  from turicreate.toolkits.topic_model import perplexity
  from .None import util
  import time
  import random
  import numpy
  import itertools
label_desc: Use image node_id 13 for calling the BasicTest obj's underlying member method code with example usage: obj.test_evaluate() without return types