from datetime import datetime


def is_valid_article(date : datetime, state : str, date_start : datetime, date_end : datetime) -> bool:
    """
    Determines if the metadata retrived from the article is valid.

    Params
    ------
    date: datetime.datetime
        Published datetime of the article

    state: str
        detected state of the incident in the article

    date_start: datetime.datetime
        article search beginning timeframe

    date_end: datetime.datetime
        article search ending timeframe

    Returns
    -------
    bool:
        boolean value determining whether the article is valid or not
    """
    
    return isinstance(state, str) and date >= date_start and date <= date_end