code: def test_init_model_card_info_obj(self):
      @Model.register("fake-model-3")
      class FakeModel(Model):
          """
          This is a fake model with a docstring.
  
          # Parameters
  
          fake_param1: str
          fake_param2: int
          """
  
          def forward(self, **kwargs):
              return {}
  
      intended_use = IntendedUse("Use 1", "User 1")
  
      model_card = ModelCard(
          **{
              "id": "this-fake-model",
              "registered_model_name": "fake-model-3",
              "intended_use": intended_use,
          }
      )
  
      model_card_dict = model_card.to_dict()
      assert model_card.display_name == "FakeModel"
  
      for key, val in intended_use.__dict__.items():
          if val:
              assert key in model_card_dict
          else:
              assert key not in model_card_dict
  
file_path: allennlp/tests/common/model_card_test.py
imports: from allennlp.common.params import Params
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.common.model_card import ModelCard, ModelUsage, IntendedUse, Paper
  from allennlp.models import Model
label_desc: Use image node_id 5 for calling the TestPretrainedModelConfiguration obj's underlying member method code with example usage: obj.test_init_model_card_info_obj() and returns: dict