class_docstr: Class containing unit tests for nltk.tgrep.
class_docstr_tok: ["Class","containing","unit","tests","for","nltk.tgrep","."]
docstr: Test that tgrep search strings handles bytes and strs the same
  way.
docstr_tok: ["Test","that","tgrep","search","strings","handles","bytes","and","strs","the","same","way","."]
code: def test_node_encoding(self):
      """
      Test that tgrep search strings handles bytes and strs the same
      way.
      """
      tree = ParentedTree.fromstring(
          "(S (NP (DT the) (JJ big) (NN dog)) "
          "(VP bit) (NP (DT a) (NN cat)))"
      )
      self.assertEqual(
          list(tgrep.tgrep_positions(b"NN", [tree])),
          list(tgrep.tgrep_positions(b"NN", [tree])),
      )
      self.assertEqual(
          list(tgrep.tgrep_nodes(b"NN", [tree])),
          list(tgrep.tgrep_nodes("NN", [tree])),
      )
      self.assertEqual(
          list(tgrep.tgrep_positions(b"NN|JJ", [tree])),
          list(tgrep.tgrep_positions("NN|JJ", [tree])),
      )
  
imports: import unittest
  from nltk import tgrep
  from nltk.tree import ParentedTree
label_desc: Use image node_id 10 for calling the TestSequenceFunctions obj's underlying member method code with example usage: obj.test_node_encoding() without return types