code: def Main():
    
    argument_parser = argparse.ArgumentParser(description=(
        'Calculates a message digest hash for every file in a directory or '
        'storage media image.'))
  
    argument_parser.add_argument(
        'source', nargs='?', action='store', metavar='image.raw', default=None,
        help=('path of the directory or filename of a storage media image '
              'containing the file.'))
  
    argument_parser.add_argument(
        '--no-auto-recurse', '--no_auto_recurse', dest='no_auto_recurse',
        action='store_true', default=False, help=(
            'Indicate that the source scanner should not auto-recurse.'))
  
    options = argument_parser.parse_args()
  
    if not options.source:
      print('Source value is missing.')
      print('')
      argument_parser.print_help()
      print('')
      return False
  
    logging.basicConfig(
        level=logging.INFO, format='[%(levelname)s] %(message)s')
  
    output_writer = StdoutWriter()
  
    if not output_writer.Open():
      print('Unable to open output writer.')
      print('')
      return False
  
    return_value = True
    source_analyzer = SourceAnalyzer(auto_recurse=not options.no_auto_recurse)
  
    try:
      source_analyzer.Analyze(options.source, output_writer)
  
      print('Completed.')
  
    except KeyboardInterrupt:
      return_value = False
  
      print('Aborted by user.')
  
    output_writer.Close()
  
    return return_value
docs: The main program function.
  
    Returns:
      bool: True if successful or False if not.