code: def test_predict_topk(self):
      k = 2
      for index in range(len(self.models)):
          model = self.models[index]
          sf = self.trains[index]
          for output_type in ["rank", "probability"]:
              preds = model.predict_topk(
                  sf, k=k, output_type=output_type
              )
              assert "id" in preds.column_names()
              assert "class" in preds.column_names()
              if output_type == "rank":
                  assert preds["rank"].dtype == int
                  assert sorted(preds["rank"].unique()) == [0, 1]
              else:
                  assert output_type == "probability"
                  assert preds["probability"].dtype == float
              assert len(preds) == k * len(sf)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  import numpy
  import tempfile
  from array import array
  import sys
  from .None import util
  import unittest
label_desc: Use image node_id 18 for calling the DrawingClassifierTest obj's underlying member method code with example usage: obj.test_predict_topk() without return types