from typing import TYPE_CHECKING

if not TYPE_CHECKING:
    ...

if TYPE_CHECKING:
    ...
else:
    ...

def func(value: int | str) -> None:
    match value:
        case int(): ...
        case str(): ...
        case _ if not TYPE_CHECKING: ...
