#!/usr/env python3.4
from argparse import (ArgumentParser,
                      ArgumentDefaultsHelpFormatter)

def main(argv=None):
    parser = ArgumentParser(description='Run incremental learning '
                                        'experiments.',
                            formatter_class=ArgumentDefaultsHelpFormatter,
                            conflict_handler='resolve')
    _add_arg = parser.add_argument
    _add_arg('-dbhost', '--mongodb_host',
             help='Host that the MongoDB server is running on.',
             type=str,
             default='localhost')
    _add_arg('--mongodb_port', '-dbport',
             help='Port that the MongoDB server is running on.',
             type=int,
             default=37017)
    args = parser.parse_args()

    # Imports
    import sys

    from pymongo import ASCENDING
    from pymongo.errors import ConnectionFailure

    from src.mongodb import connect_to_db

    # Connect to MongoDB database
    print('Connecting to MongoDB database at {0}:{1}...'
          .format(host=args.mongodb_host, port=args.mongodb_port),
          file=sys.stderr)
    try:
        db = connect_to_db(args.mongodb_host, args.mongodb_port)
    except ConnectionFailure as e:
        print('Failed to connect to the MongoDB database collection.')
        raise e

    # Create index on 'steam_id_number' so that cursors can be sorted
    # on that particular key
    print('Creating index on the "steam_id_number" key...', file=sys.stderr)
    db.create_index('steam_id_number', ASCENDING)
    print('Created new index "steam_id_number_1" in reviews collection.',
          file=sys.stderr)

@@ -1041,13 +1041,8 @@
 mat(
-host=
 args
@@ -1060,13 +1060,8 @@
 st, 
-port=
 args
@@ -1607,28 +1607,68 @@
 %0A          file=sys.stderr)%0A
+%0A%0Aif __name__ == '__main__':%0A    main()%0A

Fix bugs in util/create_mongodb_index.py to make it actually functional