from typing import Iterable
from typing import Tuple
from typing import Optional


def fromCode(
    desc: str, code_list: Iterable[Tuple[str, str]]
) -> Optional[Tuple[str, str]]:
    """
    Returns the matched element by code in the give code list. None otherwise.
    """
    res = [item for item in code_list if item[0].lower() == desc.lower()]
    return res[0] if res else None