code: def _convert_unchanged_line_by_line(
      node: Node, lines_set: Set[int]
  ) -> None:
      """Converts unchanged to STANDALONE_COMMENT line by line."""
      for leaf in node.leaves():
          if leaf.type != NEWLINE:
              # We only consider "unwrapped lines", which are divided by the NEWLINE
              # token.
              continue
          if leaf.parent and leaf.parent.type == syms.match_stmt:
              # The `suite` node is defined as:
              #   match_stmt: "match" subject_expr ':' NEWLINE INDENT case_block+ DEDENT
              # Here we need to check `subject_expr`. The `case_block+` will be
              # checked by their own NEWLINEs.
              nodes_to_ignore: List[LN] = []
              prev_sibling = leaf.prev_sibling
              while prev_sibling:
                  nodes_to_ignore.insert(0, prev_sibling)
                  prev_sibling = prev_sibling.prev_sibling
              if not _get_line_range(nodes_to_ignore).intersection(
                  lines_set
              ):
                  _convert_nodes_to_standalone_comment(
                      nodes_to_ignore, newline=leaf
                  )
          elif leaf.parent and leaf.parent.type == syms.suite:
              # The `suite` node is defined as:
              #   suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
              # We will check `simple_stmt` and `stmt+` separately against the lines set
              parent_sibling = leaf.parent.prev_sibling
              nodes_to_ignore = []
              while (
                  parent_sibling
                  and not parent_sibling.type == syms.suite
              ):
                  # NOTE: Multiple suite nodes can exist as siblings in e.g. `if_stmt`.
                  nodes_to_ignore.insert(0, parent_sibling)
                  parent_sibling = parent_sibling.prev_sibling
              # Special case for `async_stmt` and `async_funcdef` where the ASYNC
              # token is on the grandparent node.
              grandparent = leaf.parent.parent
              if (
                  grandparent is not None
                  and grandparent.prev_sibling is not None
                  and grandparent.prev_sibling.type == ASYNC
              ):
                  nodes_to_ignore.insert(0, grandparent.prev_sibling)
              if not _get_line_range(nodes_to_ignore).intersection(
                  lines_set
              ):
                  _convert_nodes_to_standalone_comment(
                      nodes_to_ignore, newline=leaf
                  )
          else:
              ancestor = furthest_ancestor_with_last_leaf(leaf)
              # Consider multiple decorators as a whole block, as their
              # newlines have different behaviors than the rest of the grammar.
              if (
                  ancestor.type == syms.decorator
                  and ancestor.parent
                  and ancestor.parent.type == syms.decorators
              ):
                  ancestor = ancestor.parent
              if not _get_line_range(ancestor).intersection(lines_set):
                  _convert_node_to_standalone_comment(ancestor)
  
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 6 for calling a global function with example usage: _convert_unchanged_line_by_line(node, lines_set) without return types