docs: def jobs_insert_query(self, sql, code=None, imports=None, table_name=None, append=False,
                          overwrite=False, dry_run=False, use_cache=True, batch=True,
                          allow_large_results=False, table_definitions=None, dialect=None,
                          billing_tier=None):
      """Issues a request to insert a query job.
  
      Args:
        sql: the SQL string representing the query to execute.
        code: code for Javascript UDFs, if any.
        imports: a list of GCS URLs containing additional Javascript UDF support code, if any.
        table_name: None for an anonymous table, or a name parts tuple for a long-lived table.
        append: if True, append to the table if it is non-empty; else the request will fail if table
            is non-empty unless overwrite is True.
        overwrite: if the table already exists, truncate it instead of appending or raising an
            Exception.
        dry_run: whether to actually execute the query or just dry run it.
        use_cache: whether to use past query results or ignore cache. Has no effect if destination is
            specified.
        batch: whether to run this as a batch job (lower priority) or as an interactive job (high
            priority, more expensive).
        allow_large_results: whether to allow large results (slower with some restrictions but
            can handle big jobs).
        table_definitions: a list of JSON external table definitions for any external tables
            referenced in the query.
        dialect : {'legacy', 'standard'}, default 'legacy'
            'legacy' : Use BigQuery's legacy SQL dialect.
            'standard' : Use BigQuery's standard SQL (beta), which is
            compliant with the SQL 2011 standard.
        billing_tier: Limits the billing tier for this job. Queries that have resource
            usage beyond this tier will fail (without incurring a charge). If unspecified, this
            will be set to your project default. This can also be used to override your
            project-wide default billing tier on a per-query basis.
      Returns:
        A parsed result object.
      Raises:
        Exception if there is an error performing the operation.
      """
      url = Api._ENDPOINT + (Api._JOBS_PATH % (self._project_id, ''))
  
      if dialect is None:
          dialect = datalab.bigquery.Dialect.default().bq_dialect
  
      data = {
          'kind': 'bigquery#job',
          'configuration': {
              'query': {
                  'query': sql,
                  'useQueryCache': use_cache,
                  'allowLargeResults': allow_large_results,
                  'useLegacySql': dialect == 'legacy'
              },
              'dryRun': dry_run,
              'priority': 'BATCH' if batch else 'INTERACTIVE',
          },
      }
  
      query_config = data['configuration']['query']
  
      resources = []
      if code:
        resources.extend([{'inlineCode': fragment} for fragment in code])
  
      if imports:
        resources.extend([{'resourceUri': uri} for uri in imports])
  
      query_config['userDefinedFunctionResources'] = resources
  
      if table_definitions:
        query_config['tableDefinitions'] = table_definitions
  
      if table_name:
        query_config['destinationTable'] = {
            'projectId': table_name.project_id,
            'datasetId': table_name.dataset_id,
            'tableId': table_name.table_id
        }
        if append:
          query_config['writeDisposition'] = "WRITE_APPEND"
        elif overwrite:
          query_config['writeDisposition'] = "WRITE_TRUNCATE"
  
      if billing_tier:
          query_config['maximumBillingTier'] = billing_tier
  
      return datalab.utils.Http.request(url, data=data, credentials=self._credentials)