from typing import Callable

import torch.nn
import torch


def get_device(return_name: bool=False) -> torch.device|tuple[torch.device,str]: ...
def calc_time(function): ...
def time_to_human(time: float|int) -> str: ...


class Color:
  BASIC_COLORS: dict[str, str]
  class Component: ...

  @staticmethod
  def _hex2dec(color_hex: str) -> tuple[int,int,int]: ...
  @staticmethod
  def _dec2hex(color_dec: tuple[int,int,int]) -> str: ...

  @classmethod
  def _get_fg_by_bg(cls, bg_dec: tuple[int,int,int]) -> str: ...

  @classmethod
  def _get_color_pattern(cls, color: str, bold: bool=False, italic: bool=False, solid: bool=False) -> str: ...

  @classmethod
  def cprint(cls, *values: object, color: str='red', bold: bool=False, italic: bool=False, solid: bool=False, show: bool=True, sep: str=' ', end: str='\n', **kwargs) -> str: ...
  @classmethod
  def custom_notify(cls, title: str, content: str, color: str|tuple[str,str], show: bool=True) -> str: ...
  @classmethod
  def notify(cls, title: str, content: str, notify_type: str="info", show: bool=True) -> str: ...

cprint        = Color.cprint
custom_notify = Color.custom_notify
notify        = Color.notify


def __get_value_in_height_and_width(value: tuple[int,int]|int, value_name: str) -> tuple[int,int]: ...
def _calc_value_after_layer(x: int, k_size: int, stride: int, padding: int) -> int: ...
def calc_feature_size(channel: int, height: int, width: int, sequential: torch.nn.Sequential) -> int: ...
