from typing import Iterable, List
from ray.types import ObjectRef
from ray.experimental.data.block import Block, BlockMetadata


class BlockList(Iterable[ObjectRef[Block]]):

    def __init__(self, blocks: List[ObjectRef[Block]], metadata: List[
        BlockMetadata]):
        assert len(blocks) == len(metadata), (blocks, metadata)
        self._blocks = blocks
        self._metadata = metadata

    def get_metadata(self) ->List[BlockMetadata]:
        return self._metadata.copy()

    def __len__(self):
        return len(self._blocks)

    def __iter__(self):
        return iter(self._blocks)

0e42a2e208302e1b900200da9dc58690f765fd70
<mask token>


class BlockList(Iterable[ObjectRef[Block]]):
    <mask token>
    <mask token>
    <mask token>

    def __iter__(self):
        return iter(self._blocks)

<mask token>


class BlockList(Iterable[ObjectRef[Block]]):

    def __init__(self, blocks: List[ObjectRef[Block]], metadata: List[
        BlockMetadata]):
        assert len(blocks) == len(metadata), (blocks, metadata)
        self._blocks = blocks
        self._metadata = metadata

    def get_metadata(self) ->List[BlockMetadata]:
        return self._metadata.copy()
    <mask token>

    def __iter__(self):
        return iter(self._blocks)

<mask token>


class BlockList(Iterable[ObjectRef[Block]]):

    def __init__(self, blocks: List[ObjectRef[Block]], metadata: List[
        BlockMetadata]):
        assert len(blocks) == len(metadata), (blocks, metadata)
        self._blocks = blocks
        self._metadata = metadata

    def get_metadata(self) ->List[BlockMetadata]:
        return self._metadata.copy()

    def __len__(self):
        return len(self._blocks)

    def __iter__(self):
        return iter(self._blocks)

from typing import Iterable, List
from ray.types import ObjectRef
from ray.experimental.data.block import Block, BlockMetadata


class BlockList(Iterable[ObjectRef[Block]]):

    def __init__(self, blocks: List[ObjectRef[Block]], metadata: List[
        BlockMetadata]):
        assert len(blocks) == len(metadata), (blocks, metadata)
        self._blocks = blocks
        self._metadata = metadata

    def get_metadata(self) ->List[BlockMetadata]:
        return self._metadata.copy()

    def __len__(self):
        return len(self._blocks)

    def __iter__(self):
        return iter(self._blocks)
