code: def check_num_computed(ds, expected, streaming_expected) -> None:
      # When streaming executor is on, the _num_computed() is affected only
      # by the ds.schema() which will still partial read the blocks, but will
      # not affected by operations like take() as it's executed via streaming
      # executor.
      if (
          not ray.data.context.DataContext.get_current().use_streaming_executor
      ):
          assert ds._plan.execute()._num_computed() == expected
      else:
          assert (
              ds._plan.execute()._num_computed() == streaming_expected
          )
  
imports: import os
  import shutil
  from typing import Any
  import numpy
  import pandas
  import pyarrow
  import pyarrow.parquet
  import pytest
  from pytest_lazyfixture import lazy_fixture
  import ray
  from ray.data.block import BlockAccessor
  from ray.data.context import DataContext
  from ray.data.datasource import DefaultFileMetadataProvider, DefaultParquetMetadataProvider
  from ray.data.datasource.parquet_base_datasource import ParquetBaseDatasource
  from ray.data.datasource.parquet_datasource import NUM_CPUS_FOR_META_FETCH_TASK, PARALLELIZE_META_FETCH_THRESHOLD, RETRY_EXCEPTIONS_FOR_META_FETCH_TASK, ParquetDatasource, _deserialize_fragments_with_retry, _SerializedFragment
  from ray.data.datasource.path_util import _unwrap_protocol
  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 1 for calling a global function with example usage: check_num_computed(ds, expected, streaming_expected) without return types