code: def test_exception(sprinkler_bbn):
      with pytest.raises(VariableValueNotInDomainError):
          sprinkler_bbn.query(rain="No")
      with pytest.raises(VariableNotInGraphError):
          sprinkler_bbn.query(sunny="True")
  
imports: from __future__ import division
  import copy
  from collections import Counter
  import pytest
  from causalnex.ebaybbn import BBNNode, JoinTree, JoinTreeCliqueNode, SepSet, build_bbn, build_bbn_from_conditionals, build_join_tree, combinations, make_moralized_copy, make_node_func, make_undirected_copy, priority_func, triangulate
  from causalnex.ebaybbn.exceptions import VariableNotInGraphError, VariableValueNotInDomainError
  from causalnex.ebaybbn.graph import Node, UndirectedNode
  from causalnex.ebaybbn.utils import get_args, get_original_factors, make_key
label_desc: Use image node_id 9 for calling a global function with example usage: test_exception(sprinkler_bbn) without return types