code: def test_data_context_propagation(ray_start_4_cpus):
      ctx = DataContext.get_current()
      # Fake DataContext attribute to propagate to worker.
      ctx.foo = "bar"
  
      def training_loop(self):
          # Dummy train loop that checks that changes in the driver's
          # DataContext are propagated to the worker.
          ctx_worker = DataContext.get_current()
          assert ctx_worker.foo == "bar"
  
      trainer = DummyTrainer(
          train_loop=training_loop,
          datasets={"train": ray.data.range(10)},
      )
      trainer.fit()
  
imports: import logging
  import tempfile
  import pytest
  import ray
  from ray import train, tune
  from ray.air.constants import MAX_REPR_LENGTH
  from ray.data.context import DataContext
  from ray.train import Checkpoint, ScalingConfig
  from ray.train.gbdt_trainer import GBDTTrainer
  from ray.train.trainer import BaseTrainer
  from ray.util.placement_group import get_current_placement_group
label_desc: Use image node_id 10 for calling a global function with example usage: test_data_context_propagation(ray_start_4_cpus) without return types