from typing import List
from typing import Optional
from typing import Tuple


def find_by_key(
    input_list: List[dict], key: str, value: str
) -> Optional[Tuple[dict, int]]:
    """Utility method to find an element in a list of dictionary by a specific key"""
    for element in input_list:
        if element[key] == value:
            return element, input_list.index(element)
    raise ValueError(f"No Element with {key}={value} found in the list")