code: def parse_train_arguments(parser=None):
      """
      Assert and parse the command-line arguments of a given (or default) parser.
      """
  
      # set input arguments:
      if parser is None:
          parser = get_parser()
  
      # parse input arguments:
      args = parser.parse_args()
  
      # assertions:
      args = check_generic_args(args)
      return args
  
imports: import argparse
  import os
  from classy_vision.generic.util import is_pos_int
label_desc: Use image node_id 4 for calling a global function with example usage: parse_train_arguments(parser) and returns: args