code: def test_from_params_base_class_kwargs_crashes_if_params_not_handled(
      self,
  ):
      class Bar(FromParams):
          def __init__(self, c: str = None) -> None:
              self.c = c
  
      class Foo(Bar):
          def __init__(self, a: int, b: str = None, **kwargs) -> None:
              super().__init__(**kwargs)
              self.a = a
              self.b = b
  
      foo = Foo.from_params(
          Params({"a": 2, "b": "hi", "c": "some value"})
      )
      assert foo.a == 2
      assert foo.b == "hi"
      assert foo.c == "some value"
  
      with pytest.raises(TypeError, match="invalid_key"):
          Foo.from_params(
              Params({"a": 2, "b": "hi", "invalid_key": "some value"})
          )
  
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 35 for calling the TestFromParams obj's underlying member method code with example usage: obj.test_from_params_base_class_kwargs_crashes_if_params_not_handled() without return types