docstr: Test SetPageSegMode and GetPageSegMode.
docstr_tok: ["Test","SetPageSegMode","and","GetPageSegMode","."]
code: def test_page_seg_mode(self):
      """Test SetPageSegMode and GetPageSegMode."""
      self._api.SetPageSegMode(tesserocr.PSM.SINGLE_WORD)
      self.assertEqual(
          self._api.GetPageSegMode(), tesserocr.PSM.SINGLE_WORD
      )
      self._api.SetPageSegMode(tesserocr.PSM.AUTO)
      self.assertEqual(self._api.GetPageSegMode(), tesserocr.PSM.AUTO)
  
imports: import unittest
  import re
  import os.path
  import tesserocr
label_desc: Use image node_id 9 for calling the TestTessBaseApi obj's underlying member method code with example usage: obj.test_page_seg_mode() without return types