code: def test_bad_overrides(self):
      with pytest.raises(ValueError, match="contains unused keys"):
          with_overrides({"foo": [0, 1, 2]}, {"foo.3": 4})
      with pytest.raises(ValueError, match="expected list or dict"):
          with_overrides({"foo": 3}, {"foo.x": 2})
  
imports: import json
  import os
  import re
  from collections import OrderedDict
  import pytest
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.params import infer_and_cast, Params, remove_keys_from_params, with_overrides
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 5 for calling the TestParams obj's underlying member method code with example usage: obj.test_bad_overrides() without return types