def check_key(key: str, messages: list) -> bool:
    """Checks that criterion has a metadata variable
    and a numeric separated by a comma (",").

    Parameters
    ----------
    key : str
        Current criterion.
    messages : list
        Message to print in case of error.

    Returns
    -------
    boolean : bool
        Whether to keep the key/value or not.

    """
    boolean = False
    if ',' not in key or len(key.split(',')) != 2:
        messages.append('Must have a metadata variable and a numeric separated by a comma (",")')
        boolean = True
    return boolean