code: def _create_cell(args, cell_body):
    
    if args['command'] == 'dataset':
      try:
        datalab.bigquery.Dataset(args['name']).create(friendly_name=args['friendly'],
                                                      description=cell_body)
      except Exception as e:
        print('Failed to create dataset %s: %s' % (args['name'], e))
    else:
      if cell_body is None:
        print('Failed to create %s: no schema specified' % args['name'])
      else:
        try:
          record = datalab.utils.commands.parse_config(cell_body,
                                                       datalab.utils.commands.notebook_environment(),
                                                       as_dict=False)
          schema = datalab.bigquery.Schema(record)
          datalab.bigquery.Table(args['name']).create(schema=schema, overwrite=args['overwrite'])
        except Exception as e:
          print('Failed to create table %s: %s' % (args['name'], e))
docs: Implements the BigQuery cell magic used to create datasets and tables.
  
     The supported syntax is:
  
       %%bigquery create dataset -n|--name <name> [-f|--friendly <friendlyname>]
       [<description>]
  
     or:
  
       %%bigquery create table -n|--name <tablename> [--overwrite]
       [<YAML or JSON cell_body defining schema to use for tables>]
  
    Args:
      args: the argument following '%bigquery create <command>'.