import typing
from typing_extensions import ParamSpec
from typed_ray.ray_types import (
    ActorHandle as ActorHandle,
    ObjectRef as ObjectRef,
    RemoteFunction as RemoteFunction,
)

T = typing.TypeVar("T")
_ArgsT = ParamSpec("_ArgsT")
_ReturnT = typing.TypeVar("_ReturnT")

def put(value: T) -> ObjectRef[T]: ...
@typing.overload
def get(object_refs: ObjectRef[T]) -> T: ...
@typing.overload
def get(object_refs: typing.List[ObjectRef[T]]) -> typing.List[T]: ...
def wait(
    object_refs: typing.List[ObjectRef[T]],
    *,
    num_returns: int = ...,
    timeout: typing.Optional[float],
    fetch_local: bool = ...
) -> typing.Tuple[typing.List[ObjectRef[T]], typing.List[ObjectRef[T]]]: ...
def remote_func(
    func: typing.Callable[_ArgsT, _ReturnT]
) -> RemoteFunction[_ArgsT, _ReturnT]: ...
def remote_cls(cls: typing.Type[typing.Any]) -> typing.Any: ...
def get_actor(
    name: str, namespace: typing.Optional[str] = ...
) -> ActorHandle[typing.Any]: ...
def kill(actor: ActorHandle[typing.Any]) -> None: ...
def cancel(
    object_ref: ObjectRef[typing.Any], *, force: bool = ..., recursive: bool = ...
) -> None: ...
def get_gpu_ids() -> typing.List[str]: ...
def shutdown(_exiting_interpreter: bool = ...) -> None: ...
def method(num_returns: int) -> typing.Any: ...
def nodes() -> typing.List[
    typing.Dict[str, typing.Union[float, typing.Dict[str, float]]]
]: ...
def cluster_resources() -> typing.Dict[str, float]: ...
def available_resources() -> typing.Dict[str, float]: ...
def timeline() -> typing.List[typing.Dict[str, typing.Any]]: ...
