def _has_valid_ordered_variable_names(ordered_variable_names, variables):
    """Check if ordered_variable_names is present and that it includes all instance variables."""
    if not ordered_variable_names:
        return False
    return len(ordered_variable_names) == len(variables) and set(
        ordered_variable_names) == set(variables.keys())
