code: def _assert_has_stages(stages, stage_names):
      assert len(stages) == len(stage_names)
      for stage, name in zip(stages, stage_names):
          assert stage.name == name
  
imports: import os
  from typing import List
  import numpy
  import pandas
  import pytest
  import ray
  from ray._private.internal_api import memory_summary
  from ray.data import Dataset
  from ray.data.block import BlockMetadata
  from ray.data.context import DataContext
  from ray.data.datasource import Datasource, ReadTask
  from ray.data.datasource.csv_datasource import CSVDatasource
  from ray.data.tests.util import column_udf, extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 8 for calling a global function with example usage: _assert_has_stages(stages, stage_names) without return types