code: def get_flags_parser() -> argparse.ArgumentParser:
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--target-version",
          action="append",
          type=lambda val: TargetVersion[val.upper()],
          default=(),
      )
      parser.add_argument(
          "--line-length", default=DEFAULT_LINE_LENGTH, type=int
      )
      parser.add_argument(
          "--skip-string-normalization",
          default=False,
          action="store_true",
      )
      parser.add_argument("--pyi", default=False, action="store_true")
      parser.add_argument("--ipynb", default=False, action="store_true")
      parser.add_argument(
          "--skip-magic-trailing-comma",
          default=False,
          action="store_true",
      )
      parser.add_argument(
          "--preview", default=False, action="store_true"
      )
      parser.add_argument("--fast", default=False, action="store_true")
      parser.add_argument(
          "--minimum-version",
          type=_parse_minimum_version,
          default=None,
          help=(
              "Minimum version of Python where this test case is parseable. If this is"
              " set, the test case will be run twice: once with the specified"
              " --target-version, and once with --target-version set to exactly the"
              " specified version. This ensures that Black's autodetection of the target"
              " version works correctly."
          ),
      )
      parser.add_argument("--line-ranges", action="append")
      parser.add_argument(
          "--no-preview-line-length-1",
          default=False,
          action="store_true",
          help=(
              "Don't run in preview mode with --line-length=1, as that's known to cause a"
              " crash"
          ),
      )
      return parser
  
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 11 for calling a global function with example usage: get_flags_parser() and returns: parser