from typing import List
from typing import Any


def __find_item_index(list_to_look_in: List[Any], item_name: str):
    """
    Returns the index of the first item in the list that matches the given name.
    :param list_to_look_in: list of elements that contain name attributes
    :param item_name: the item name to actually search for
    :return: The index of the object if any are found.
    """
    for count, element in enumerate(list_to_look_in):
        if element.name == item_name:
            return count