from typing import Dict
from typing import Optional


def _find_construct(fullname: str, ast: Dict) -> Optional[Dict]:
    """
    Find a C construct inside of the provided `ast`.

    Args:
        fullname (str): The full, dotted name, to the C construct.

        ast (dict):
            A dictionary like representation of the code constructs.
            See :ref:`developer_notes:Common Terms`.

    Returns:
        Dict: The C construct if it is found in the `ast`.  None otherwise.

    """
    parts = fullname.split(".", 1)
    parent = parts[0]
    child = {}
    for child in ast["children"]:
        if child["name"] == parent:
            break
    else:
        return None

    if len(parts) > 1:
        child_path = parts[1]
        return _find_construct(child_path, child)

    return child