code: def test_parse_dict_extra_key(self):
      parser = HfArgumentParser(BasicExample)
  
      args_dict = {
          "foo": 12,
          "bar": 3.14,
          "baz": "42",
          "flag": True,
          "extra": 42,
      }
  
      self.assertRaises(
          ValueError,
          parser.parse_dict,
          args_dict,
          allow_extra_keys=False,
      )
  
imports: import argparse
  import json
  import os
  import tempfile
  import unittest
  from argparse import Namespace
  from dataclasses import dataclass, field
  from enum import Enum
  from pathlib import Path
  from typing import List, Optional
  import yaml
  from transformers import HfArgumentParser, TrainingArguments
  from transformers.hf_argparser import string_to_bool
label_desc: Use image node_id 11 for calling the HfArgumentParserTest obj's underlying member method code with example usage: obj.test_parse_dict_extra_key() without return types