code: def _execute_read_task_nosplit(
      i: int,
      task: ReadTask,
      context: DataContext,
      stats_uuid: str,
      stats_actor: ray.actor.ActorHandle,
  ) -> Tuple[Block, BlockMetadata]:
      DataContext._set_current(context)
      stats = BlockExecStats.builder()
  
      # Execute the task. Expect only one block returned when dynamic block splitting is
      # not enabled.
      blocks = list(task())
      assert len(blocks) == 1
      block = blocks[0]
  
      metadata = task.get_metadata()
      metadata = BlockAccessor.for_block(block).get_metadata(
          input_files=metadata.input_files, exec_stats=stats.build()
      )
      stats_actor.record_task.remote(stats_uuid, i, [metadata])
      return block, metadata
  
imports: import math
  import uuid
  from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union
  import ray
  from ray.data._internal.block_list import BlockList
  from ray.data._internal.memory_tracing import trace_allocation
  from ray.data._internal.progress_bar import ProgressBar
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data._internal.stats import DatasetStats, _get_or_create_stats_actor
  from ray.data._internal.util import _split_list
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata, BlockPartitionMetadata, MaybeBlockPartition
  from ray.data.context import DataContext
  from ray.data.datasource import ReadTask
  from ray.types import ObjectRef
label_desc: Use image node_id 1 for calling a global function with example usage: _execute_read_task_nosplit(i, task, context, stats_uuid, stats_actor) and returns: block,  metadata