def add_req(s: str, req: str) -> str:
    """
    A helper function to format test requirement.

    Args:
        s (str): prefix, particularly, "supported_features"
        req (str): requirement to add

    Returns:
        str: complete formatted requirement
    """
    if "[" not in s:
        s = s + "[" + req + "]"
    else:
        s = s[:-1] + ", " + req + "]"
    return s