from __future__ import annotations

from typing import Any, Optional

dtype_to_size: Any

class VarBlock:
    varname: Any = ...
    offset: Any = ...
    size: Any = ...
    def __init__(self, varname: Any, offset: Any, size: Any) -> None: ...

def create_var_struct(var: Any): ...

class VarStruct:
    name: Any = ...
    shape: Any = ...
    dtype: Any = ...
    type: Any = ...
    lod_level: Any = ...
    persistable: Any = ...
    m_size: int = ...
    def __init__(self, name: Any, shape: Any, dtype: Any, type: Any, lod_level: Any, persistable: Any): ...

class VarDistributed:
    origin: Any = ...
    slice: Any = ...
    is_slice: bool = ...
    block_id: int = ...
    offset: int = ...
    vtype: Any = ...
    endpoint: Any = ...
    def __init__(
        self,
        origin_var: Any,
        slice_var: Any,
        is_slice: Optional[Any] = ...,
        block_id: Optional[Any] = ...,
        offset: Optional[Any] = ...,
        vtype: Optional[Any] = ...,
        endpoint: Optional[Any] = ...,
    ) -> None: ...
    @staticmethod
    def equal(var1: Any, var2: Any): ...

class VarsDistributed:
    distributed_vars: Any = ...
    def __init__(self) -> None: ...
    def add_distributed_var(
        self,
        origin_var: Any,
        slice_var: Any,
        is_slice: Optional[Any] = ...,
        block_id: Optional[Any] = ...,
        offset: Optional[Any] = ...,
        vtype: Optional[Any] = ...,
        endpoint: Optional[Any] = ...,
    ) -> None: ...
