docstr: Test GetThresholdedImage and GetThresholdedImageScaleFactor.
docstr_tok: ["Test","GetThresholdedImage","and","GetThresholdedImageScaleFactor","."]
code: def test_thresholded_image(self):
      """Test GetThresholdedImage and GetThresholdedImageScaleFactor."""
      orig_size = self._image.size
      self._api.SetImage(self._image)
      image = self._api.GetThresholdedImage()
      self.assertIsNot(image, None)
      self.assertIsInstance(image, Image.Image)
      self.assertEqual(image.size, orig_size)
      self.assertEqual(self._api.GetThresholdedImageScaleFactor(), 1)
  
imports: import unittest
  import re
  import os.path
  import tesserocr
label_desc: Use image node_id 8 for calling the TestTessBaseApi obj's underlying member method code with example usage: obj.test_thresholded_image() without return types