code: def test_private_method():
      """Test parsing of a private method."""
      parser = Parser()
      code = CodeSnippet(
          """\
          class TestedClass(object):
              def _do_it(param):
                  \"""Do the 'it'\"""
                  # do nothing
                  return None
      """
      )
      module = parser.parse(code, "file_path")
  
      (klass,) = module.children
      assert klass.name == "TestedClass"
      assert klass.decorators == []
      assert klass.docstring is None
      assert klass.kind == "class"
      assert klass.parent == module
      assert klass.start == 1
      assert klass.end == 5
      assert klass.error_lineno == 1
      assert klass.source == code.getvalue()
      assert klass.is_public
      assert str(klass) == "in public class `TestedClass`"
  
      (method,) = klass.children
      assert method.name == "_do_it"
      assert method.decorators == []
      assert method.docstring == '''"""Do the 'it'"""'''
      assert method.kind == "method"
      assert method.parent == klass
      assert method.start == 2
      assert method.end == 5
      assert method.error_lineno == 3
      assert textwrap.dedent(method.source) == textwrap.dedent(
          """\
          def _do_it(param):
              \"""Do the 'it'\"""
              # do nothing
              return None
      """
      )
      assert not method.is_public
      assert not method.is_magic
      assert str(method) == "in private method `_do_it`"
  
imports: import io
  import sys
  import pytest
  import textwrap
  from pathlib import Path
  from pydocstyle.parser import Parser, ParseError
label_desc: Use image node_id 10 for calling a global function with example usage: test_private_method() without return types