def should_save_html_according_response_code(code, allowed_list):
    """
    Args:
        code (int): response status code
        allowed_list (list): list of response status codes allowed to save html

    Returns:
        bool: True if allowed_list is empty (save all responses), or response
              code in allowed list.
    """
    return not allowed_list or code in allowed_list