code: def check_file(
      binary: str,
      file: str,
  ) -> List[LintMessage]:
      try:
          proc = run_command([binary, file])
      except OSError as err:
          return [
              LintMessage(
                  path=None,
                  line=None,
                  char=None,
                  code=LINTER_CODE,
                  severity=LintSeverity.ERROR,
                  name="command-failed",
                  original=None,
                  replacement=None,
                  description=(
                      f"Failed due to {err.__class__.__name__}:\n{err}"
                  ),
              )
          ]
      stdout = str(proc.stdout, "utf-8").strip()
      return [
          LintMessage(
              path=match["file"],
              name=match["code"],
              description=match["message"],
              line=int(match["line"]),
              char=int(match["char"]),
              code=LINTER_CODE,
              severity=LintSeverity.ERROR,
              original=None,
              replacement=None,
          )
          for match in RESULTS_RE.finditer(stdout)
      ]
  
file_path: pytorch/tools/linter/adapters/actionlint_linter.py
imports: import argparse
  import concurrent.futures
  import json
  import logging
  import os
  import re
  import subprocess
  import sys
  import time
  from enum import Enum
  from typing import List, NamedTuple, Optional, Pattern
label_desc: Use image node_id 2 for calling a global function with example usage: check_file(binary, file) and returns: unknown, list