from typing import List
from typing import Dict
from typing import Any


def validate_cell_header(
        headers: List[str], cell: Dict[str, Any]
) -> List[str]:
    """Check that header of a cell meets project specifications."""
    content = [line.rstrip('\n') for line in cell['source']]
    curr_header = content[0]

    msg = f"Cell header must be h2 (i.e. start with ##), found: {curr_header}"
    if not curr_header.startswith('## '):
        raise ValueError(msg)

    msg = f"Each header must appear only once, '{curr_header}' is duplicated"
    if curr_header in headers:
        raise ValueError(msg)

    headers.append(curr_header)
    return headers