class_docstr: Tests for BigQuery Write.
class_docstr_tok: ["Tests","for","BigQuery","Write","."]
code: def test_write_dataset_exists(self, ray_remote_function_mock):
      bq_datasink = _BigQueryDatasink(
          project_id=_TEST_GCP_PROJECT_ID,
          dataset="existingdataset" + "." + _TEST_BQ_TABLE_ID,
      )
      arr = pa.array([2, 4, 5, 100])
      block = pa.Table.from_arrays([arr], names=["data"])
      status = bq_datasink.write(
          blocks=[block],
          ctx=None,
      )
      assert status == "ok"
  
imports: from unittest import mock
  import pyarrow
  import pytest
  from google.api_core import exceptions, operation
  from google.cloud import bigquery, bigquery_storage
  from google.cloud.bigquery import job
  from google.cloud.bigquery_storage_v1.types import stream
  import ray
  from ray.data.datasource import BigQueryDatasource, _BigQueryDatasink
  from ray.data.tests.conftest import *
  from ray.data.tests.mock_http_server import *
  from ray.tests.conftest import *
label_desc: Use image node_id 2 for calling the TestWriteBigQuery obj's underlying member method code with example usage: obj.test_write_dataset_exists(ray_remote_function_mock) without return types