mlx.core.__prefix__:
  from typing import Any, ParamSpec, Protocol, TypeAlias, TypeVar
  P = ParamSpec("P")
  R = TypeVar("R")
  class DLPackCompatible(Protocol):
    __dlpack__: Callable[..., Any]
    __dlpack_device__: Callable[..., Any]

mlx.core.__suffix__:
  scalar: TypeAlias = int | float | bool | complex
  list_or_scalar: TypeAlias = scalar | list["list_or_scalar"]
  StreamOrDevice: TypeAlias = Stream | ThreadLocalStream | Device | DeviceType | None
  bool_: Dtype = ...

mlx.core.distributed.__prefix__:
  from mlx.core import array, Dtype, StreamOrDevice, scalar
  from mlx.core.distributed import Group
  from collections.abc import Sequence

mlx.core.fast.__prefix__:
  from mlx.core import array, Dtype, StreamOrDevice, scalar

mlx.core.linalg.__prefix__:
  from mlx.core import array, Dtype, StreamOrDevice, scalar
  from collections.abc import Sequence

mlx.core.metal.__prefix__:
  from mlx.core import array, Dtype, Device, Stream, scalar
  from collections.abc import Sequence

mlx.core.random.__prefix__:
  from mlx.core import array, Dtype, StreamOrDevice, scalar, float32, int32
  from collections.abc import Sequence
