code: def test_set_lo(self):
      code = (
          '"""This is a module docstring"""\n'
          "class C:\n"
          "    def __init__(self, a,\n"
          "                 b=True):\n"
          "        pass\n"
      )
      pos = 42
      p = self.parser
      p.set_code(code)
  
      # Previous character is not a newline.
      with self.assertRaises(AssertionError):
          p.set_lo(5)
  
      # A value of 0 doesn't change self.code.
      p.set_lo(0)
      self.assertEqual(p.code, code)
  
      # An index that is preceded by a newline.
      p.set_lo(pos)
      self.assertEqual(p.code, code[pos:])
  
imports: from idlelib import pyparse
  import unittest
  from collections import namedtuple
label_desc: Use image node_id 6 for calling the PyParseTest obj's underlying member method code with example usage: obj.test_set_lo() without return types