docs: def _create_bigquery_parser():
    """ Create the parser for the %bq magics.
  
    Note that because we use the func default handler dispatch mechanism of argparse,
    our handlers can take only one argument which is the parsed args. So we must create closures
    for the handlers that bind the cell contents and thus must recreate this parser for each
    cell upon execution.
    """
    parser = google.datalab.utils.commands.CommandParser(prog='%bq', description="""
  Execute various BigQuery-related operations. Use "%bq <command> -h"
  for help on a specific command.
    """)
  
    # This is a bit kludgy because we want to handle some line magics and some cell magics
    # with the bq command.
  
    # %bq datasets
    _add_command(parser, _create_dataset_subparser, _dataset_line, cell_prohibited=True)
  
    # %bq tables
    _add_command(parser, _create_table_subparser, _table_cell)
  
    # %%bq query
    _add_command(parser, _create_query_subparser, _query_cell)
  
    # %%bq execute
    _add_command(parser, _create_execute_subparser, _execute_cell)
  
    # %bq extract
    _add_command(parser, _create_extract_subparser, _extract_cell)
  
    # %%bq sample
    _add_command(parser, _create_sample_subparser, _sample_cell)
  
    # %%bq dryrun
    _add_command(parser, _create_dryrun_subparser, _dryrun_cell)
  
    # %%bq udf
    _add_command(parser, _create_udf_subparser, _udf_cell, cell_required=True)
  
    # %%bq datasource
    _add_command(parser, _create_datasource_subparser, _datasource_cell, cell_required=True)
  
    # %bq load
    _add_command(parser, _create_load_subparser, _load_cell)
  
    # %bq pipeline
    _add_command(parser, _create_pipeline_subparser, _pipeline_cell)
  
    return parser