code: def test_good_error_message_when_passing_non_params(self):
      from allennlp.nn import InitializerApplicator
  
      # This was how we used to take initializer params.  We want to be sure we give a reasonable
      # error message when something like this is passed to FromParams.
      params = Params(
          {
              "initializer": [
                  ["regex1", "uniform"],
                  ["regex2", "orthogonal"],
              ]
          }
      )
      with pytest.raises(
          ConfigurationError, match="dictionary.*InitializerApplicator"
      ):
          InitializerApplicator.from_params(
              params=params.pop("initializer")
          )
  
imports: from typing import Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union
  import pytest
  import torch
  from allennlp.common import Lazy, Params, Registrable
  from allennlp.common.from_params import FromParams, takes_arg, remove_optional, create_kwargs
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import DataLoader, DatasetReader, Tokenizer
  from allennlp.models import Model
  from allennlp.models.archival import load_archive
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 4 for calling the TestFromParams obj's underlying member method code with example usage: obj.test_good_error_message_when_passing_non_params() without return types