class_docstr: Python source code parser to detect location of functions,
  classes and methods.
class_docstr_tok: ["Python","source","code","parser","to","detect","location","of","functions",",","classes","and","methods","."]
docstr: Finalize definition block.
docstr_tok: ["Finalize","definition","block","."]
code: def finalize_block(self) -> None:
      """Finalize definition block."""
      definition = self.indents.pop()
      if definition[0] != "other":
          typ, funcname, start_pos = definition
          end_pos = self.current.end[0] - 1  # type: ignore[union-attr]
          while emptyline_re.match(self.get_line(end_pos)):
              end_pos -= 1
  
          self.add_definition(funcname, (typ, start_pos, end_pos))  # type: ignore[arg-type]
          self.context.pop()
  
imports: from __future__ import annotations
  import ast
  import contextlib
  import functools
  import inspect
  import itertools
  import operator
  import re
  import tokenize
  from inspect import Signature
  from token import DEDENT, INDENT, NAME, NEWLINE, NUMBER, OP, STRING
  from tokenize import COMMENT, NL
  from typing import Any
  from sphinx.pycode.ast import unparse
label_desc: Use image node_id 5 for calling the DefinitionFinder obj's underlying member method code with example usage: obj.finalize_block() without return types