code: def _leaf_line_end(leaf: Leaf) -> int:
      """Returns the line number of the leaf node's last line."""
      if leaf.type == NEWLINE:
          return leaf.lineno
      else:
          # Leaf nodes like multiline strings can occupy multiple lines.
          return leaf.lineno + str(leaf).count("\n")
  
imports: import difflib
  from dataclasses import dataclass
  from typing import Collection, Iterator, List, Sequence, Set, Tuple, Union
  from black.nodes import LN, STANDALONE_COMMENT, Leaf, Node, Visitor, first_leaf, furthest_ancestor_with_last_leaf, last_leaf, syms
  from blib2to3.pgen2.token import ASYNC, NEWLINE
label_desc: Use image node_id 9 for calling a global function with example usage: _leaf_line_end(leaf) and returns: leaf, unknown