from copy import copy from typing import TYPE_CHECKING, Protocol, Self class Clonable[T = Self](Protocol): def clone(self) -> T: return copy(self)