from typing import Any
from typing import Union
from typing import Type


def tuple_contains(
    item: tuple[Any, ...],
    contents: Union[Type[Any], tuple[Type[Any], ...]]) -> bool:
    """Returns whether tuple 'item' contains the data type(s) in 'contents'.

    Args:
        item (tuple[Any, ...]): [description]
        contents (Union[Type[Any], tuple[Type[Any], ...]]): [description]

    Returns:
        bool: [description]
    """
    if isinstance(contents, tuple) and len(item) == len(contents):
        return all(isinstance(item[i], contents[i]) for i in enumerate(item)) # type: ignore
    else:
        return all(isinstance(item[i], contents) for i in item)