code: def test_conditional_nested_function():
      """Test parsing of a nested function inside a condition."""
      parser = Parser()
      code = CodeSnippet(
          """\
          def outer_function():
              \"""This is the outer function.\"""
              if True:
                  def inner_function():
                      '''This is the inner function.'''
                      return None
              return None
      """
      )
      module = parser.parse(code, "file_path")
  
      (outer_function,) = module.children
      assert outer_function.name == "outer_function"
      assert outer_function.decorators == []
      assert (
          outer_function.docstring
          == '"""This is the outer function."""'
      )
      assert outer_function.kind == "function"
      assert outer_function.parent == module
      assert outer_function.start == 1
      assert outer_function.end == 7
      assert outer_function.source == code.getvalue()
      assert outer_function.is_public
      assert (
          str(outer_function) == "in public function `outer_function`"
      )
  
      (inner_function,) = outer_function.children
      assert inner_function.name == "inner_function"
      assert inner_function.decorators == []
      assert (
          inner_function.docstring
          == "'''This is the inner function.'''"
      )
      assert inner_function.kind == "function"
      assert inner_function.parent == outer_function
      assert inner_function.start == 4
      assert inner_function.end == 6
      assert textwrap.dedent(inner_function.source) == textwrap.dedent(
          """\
          def inner_function():
              '''This is the inner function.'''
              return None
      """
      )
      assert not inner_function.is_public
      assert (
          str(inner_function)
          == "in private nested function `inner_function`"
      )
  
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 6 for calling a global function with example usage: test_conditional_nested_function() without return types