from typing import Sequence
from typing import Any


def find(sequence: Sequence, target_element: Any) -> int:
    """Find the index of the first occurrence of target_element in sequence.

    Args:
        sequence: A sequence which to search through
        target_element: An element to search in the sequence

    Returns:
        The index of target_element's first occurrence, -1 if it was not found or the sequence is empty
    """

    if not sequence:
        return -1

    try:
        return sequence.index(target_element)

    except ValueError:
        return -1