code: def test_set_parameters_allow_missing():
      model = mock_model()
      sockeye.model.initialize_parameters(model)
      model_params = dict(model.named_parameters())
      model.set_parameters({}, allow_missing=True)
      assert "embedding_source.embedding.weight" in model_params
      with pytest.raises(AssertionError) as e:
          model.set_parameters({}, allow_missing=False)
      assert (
          str(e.value)
          == "Parameter 'embedding_source.embedding.weight' is missing in new_params dictionary. "
          "Set allow_missing=True to ignore missing parameters."
      )
  
file_path: sockeye/test/unit/test_params.py
imports: import glob
  import itertools
  import os.path
  import tempfile
  import pytest
  import torch
  import sockeye.constants
  import sockeye.encoder
  import sockeye.model
  import sockeye.training
label_desc: Use image node_id 5 for calling a global function with example usage: test_set_parameters_allow_missing() without return types