code: def make_file_extension_assertion(extension):
      
      def file_extension_assertion(file_path):
          base, ext = os.path.splitext(file_path)
          if ext.lower() != extension:
              raise argparse.ArgumentTypeError('File must have ' + extension + ' extension')
          return file_path
      return file_extension_assertion
docs: Function factory for file extension argparse assertion
          Args:
              extension (string): the file extension to assert
  
          Returns:
              string: the supplied extension, if assertion is successful.