def METHOD_NAME(shape, example_dict, path):
    invalid_members = [
        k for k in example_dict.keys() if k not in shape.members
    ]
    if invalid_members:
        dotted_path = '.'.join(path)
        raise AssertionError(
            "Invalid members found for {}: {}".format(
                dotted_path, invalid_members
            )
        )
    for member_name, example_value in example_dict.items():
        member = shape.members[member_name]
        _assert_valid_values(member, example_value, path + [member_name])