code: def regular_file() -> Callable:
      """
      Returns a method that can be used in argument parsing to check the argument is a regular file or a symbolic link,
      but not, e.g., a process substitution.
  
      :return: A method that can be used as a type in argparse.
      """
  
      def check_regular_file(value_to_check):
          value_to_check = str(value_to_check)
          if not os.path.isfile(value_to_check):
              raise argparse.ArgumentTypeError(
                  "must exist and be a regular file."
              )
          return value_to_check
  
      return check_regular_file
  
imports: import argparse
  import os
  import sys
  import types
  from typing import Any, Callable, Dict, List, Tuple, Optional
  import yaml
  from sockeye.utils import smart_open
  from .None import constants
label_desc: Use image node_id 3 for calling a global function with example usage: regular_file() and returns: check_regular_file, value_to_check