def METHOD_NAME(shape: Union[int, Tuple[int, ...]], lval: int = 0) -> Tuple[int, ...]:
    """
    Verifies and normalizes the given shape.
    Parameters
    ----------
    shape : int or Tupe[int,...]
        Shape of an array.
    lval : int
        Lowest legal value
    Raises
    -------
    ValueError
        If the shape contains illegal values, e.g. negative numbers.
    TypeError
        If the given shape is neither and int or a sequence of ints.
    Examples
    --------
    >>> import heat as ht
    >>> ht.core.stride_tricks.sanitize_shape(3)
    (3,)
    >>> ht.core.stride_tricks.sanitize_shape([1, 2, 3])
    (1, 2, 3,)
    >>> ht.core.stride_tricks.sanitize_shape(1.0)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "heat/heat/core/stride_tricks.py", line 159, in sanitize_shape
        raise TypeError("expected sequence object with length >= 0 or a single integer")
    TypeError: expected sequence object with length >= 0 or a single integer
    """
    shape = tuple(shape) if hasattr(shape, "__iter__") else (shape,)
    for dimension in shape:
        if issubclass(type(dimension), np.integer):
            dimension = int(dimension)
        if not isinstance(dimension, int):
            raise TypeError("expected sequence object with length >= 0 or a single integer")
        if dimension < lval:
            raise ValueError("negative dimensions are not allowed")
    return shape