def create_parser(do_training=False):
    """
    Convenience function for creating a Python argument parser for ORK
    
    :param do_training: if True, it is a parser for a training pipeline: it only adds a commit argument that allows
            you to commit to a database
    """
    parser = ObjectRecognitionParser()
    parser.add_argument('-c', '--config_file', help='Config file')
    parser.add_argument(
        '--visualize',
        help='If set and the pipeline supports it, it will display some windows '
        'with temporary results',
        default=False,
        action='store_true')

    if do_training:
        parser.add_argument('--commit',
                            dest='commit',
                            action='store_true',
                            default=False,
                            help='Commit the data to the database.')

    return parser