code: def _assert_format_inner(
      source: str,
      expected: Optional[str] = None,
      mode: black.Mode = DEFAULT_MODE,
      *,
      fast: bool = False,
      minimum_version: Optional[Tuple[int, int]] = None,
      lines: Collection[Tuple[int, int]] = (),
  ) -> None:
      actual = black.format_str(source, mode=mode, lines=lines)
      if expected is not None:
          _assert_format_equal(expected, actual)
      # It's not useful to run safety checks if we're expecting no changes anyway. The
      # assertion right above will raise if reality does actually make changes. This just
      # avoids wasted CPU cycles.
      if not fast and source != actual:
          # Unfortunately the AST equivalence check relies on the built-in ast module
          # being able to parse the code being formatted. This doesn't always work out
          # when checking modern code on older versions.
          if (
              minimum_version is None
              or sys.version_info >= minimum_version
          ):
              black.assert_equivalent(source, actual)
          black.assert_stable(source, actual, mode=mode, lines=lines)
  
imports: import argparse
  import functools
  import os
  import shlex
  import sys
  import unittest
  from contextlib import contextmanager
  from dataclasses import dataclass, field, replace
  from functools import partial
  from pathlib import Path
  from typing import Any, Collection, Iterator, List, Optional, Tuple
  import black
  from black.const import DEFAULT_LINE_LENGTH
  from black.debug import DebugVisitor
  from black.mode import TargetVersion
  from black.output import diff, err, out
  from black.ranges import parse_line_ranges
  from .None import conftest
label_desc: Use image node_id 3 for calling a global function with example usage: _assert_format_inner(source, expected, mode) without return types