code: def main(
      function: Callable[[IO[str]], Iterable[tuple[int, str]]],
      source_path: str,
      output_format: str,
  ) -> bool:
      """
      Main entry point of the script.
  
      Parameters
      ----------
      function : Callable
          Function to execute for the specified validation type.
      source_path : str
          Source path representing path to a file/directory.
      output_format : str
          Output format of the error message.
      file_extensions_to_check : str
          Comma separated values of what file extensions to check.
      excluded_file_paths : str
          Comma separated values of what file paths to exclude during the check.
  
      Returns
      -------
      bool
          True if found any patterns are found related to the given function.
  
      Raises
      ------
      ValueError
          If the `source_path` is not pointing to existing file/directory.
      """
      is_failed: bool = False
  
      for file_path in source_path:
          with open(file_path, encoding="utf-8") as file_obj:
              for line_number, msg in function(file_obj):
                  is_failed = True
                  print(
                      output_format.format(
                          source_path=file_path,
                          line_number=line_number,
                          msg=msg,
                      )
                  )
  
      return is_failed
  
file_path: pandas/scripts/validate_unwanted_patterns.py
imports: import argparse
  import ast
  from collections.abc import Iterable
  import sys
  import token
  import tokenize
  from typing import IO, Callable
label_desc: Use image node_id 6 for calling a global function with example usage: main(function, source_path, output_format) and returns: is_failed