code: def add_parser(subparsers, parent_parser):
      ADD_HELP = "Check whether files or directories are excluded due to `.dvcignore`."
  
      parser = subparsers.add_parser(
          "check-ignore",
          parents=[parent_parser],
          description=append_doc_link(ADD_HELP, "check-ignore"),
          help=ADD_HELP,
          formatter_class=formatter.RawDescriptionHelpFormatter,
      )
      parser.add_argument(
          "-d",
          "--details",
          action="store_true",
          default=False,
          help="Show the exclude patterns along with each target path.",
      )
      parser.add_argument(
          "-a",
          "--all",
          action="store_true",
          default=False,
          help=(
              "Include the target paths which don't match any pattern "
              "in the `--details` list."
          ),
      )
      parser.add_argument(
          "-n",
          "--non-matching",
          action="store_true",
          default=False,
          help=(
              "Include the target paths which don't match any pattern "
              "in the `--details` list."
          ),
      )
      parser.add_argument(
          "--stdin",
          action="store_true",
          default=False,
          help="Read paths from standard input instead of providing `targets`.",
      )
      parser.add_argument(
          "targets", nargs="*", help="File or directory paths to check"
      ).complete = completion.FILE
      parser.set_defaults(func=CmdCheckIgnore)
  
file_path: dvc/dvc/commands/check_ignore.py
imports: from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: add_parser(subparsers, parent_parser) without return types