def _validate_dict_keys(dict_to_check, required_keys, optional_keys):
    assert set(required_keys) <= set(dict_to_check.keys()), (
        'Missing keys: %s' % dict_to_check)
    assert set(dict_to_check.keys()) <= set(required_keys + optional_keys), (
        'Extra keys: %s' % dict_to_check)
Conversion from digraph to sparse matrix to digraph.
dataset/ETHPy150Open oppia/oppia/schema_utils_test.py/_validate_dict_keys--crossover with--dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/tests/test_convert_scipy.py/TestConvertNumpy.test_identity_digraph_matrix