@stmt.command(name="<STR_LIT>", context_settings=CONTEXT_SETTINGS)<EOL>@click.option("<STR_LIT>", help="<STR_LIT>")<EOL>@click.option("<STR_LIT>", help="<STR_LIT>")<EOL>@click.option(<EOL>"<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>@click.argument("<STR_LIT>")<EOL>@pass_context<EOL>def stmt_validate(ctx, statement, version, api, config_fn):
if config_fn:<EOL><INDENT>config = bel.db.Config.merge_config(ctx.config, override_config_fn=config_fn)<EOL><DEDENT>else:<EOL><INDENT>config = ctx.config<EOL><DEDENT>api = utils.first_true(<EOL>[api, config["<STR_LIT>"]["<STR_LIT>"].get("<STR_LIT>", None)], None<EOL>)<EOL>version = utils.first_true(<EOL>[version, config["<STR_LIT>"]["<STR_LIT>"].get("<STR_LIT>", None)], None<EOL>)<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>".format(version))<EOL>print("<STR_LIT>".format(api))<EOL>print("<STR_LIT>")<EOL>bo = BEL(version=version, endpoint=api)<EOL>bo.parse(statement)<EOL>if bo.ast is None:<EOL><INDENT>print(bo.original_bel_stmt)<EOL>print(bo.parse_visualize_error)<EOL>print(bo.validation_messages)<EOL><DEDENT>else:<EOL><INDENT>print(bo.ast.to_triple())<EOL>if bo.validation_messages:<EOL><INDENT>print(bo.validation_messages)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT><DEDENT>return<EOL>
Parse statement and validate