code: def test_create_model_cards(
      model_name, base_model, dataset, training_logs, eval
  ):
      if model_name not in [
          "h2ogpt-research-oasst1-llama-65b",
      ]:
          return
      model_size = model_name.split("-")[-1].upper()
      assert "B" == model_size[-1]
      assert int(model_size[-2]) >= 0
      assert os.path.exists(
          "README-template.md"
      ), "must be running this test from the model dir."
      shutil.rmtree(model_name, ignore_errors=True)
      try:
          repo = huggingface_hub.Repository(
              local_dir=model_name,
              clone_from="h2oai/%s" % model_name,
              skip_lfs_files=True,
              token=True,
          )
          repo.git_pull()
      except:
          print(
              "call 'huggingface_cli login' first and provide access token with write permission"
          )
      model = AutoModelForCausalLM.from_pretrained(
          "h2oai/%s" % model_name,
          local_files_only=False,
          trust_remote_code=True,
          torch_dtype=torch.float16,
          device_map="auto",
      )
      model_arch = str(model)
      model_config = str(model.config)
      with open("README-template.md", "r") as f:
          content = f.read()
          assert "<<MODEL_NAME>>" in content
          content = content.replace("<<MODEL_NAME>>", model_name)
  
          assert "<<MODEL_SIZE>>" in content
          content = content.replace("<<MODEL_SIZE>>", model_size[:-1])
  
          assert "<<BASE_MODEL>>" in content
          content = content.replace(
              "<<BASE_MODEL>>",
              f"[{base_model}](https://huggingface.co/{base_model})",
          )
  
          assert "<<DATASET>>" in content
          assert "<<DATASET_NAME>>" in content
          if not isinstance(dataset, list):
              dataset = [dataset]
          content = content.replace(
              "<<DATASET>>",
              " and ".join(
                  [
                      f"[{d}](https://huggingface.co/datasets/{d})"
                      for d in dataset
                  ]
              ),
          )
          content = content.replace(
              "<<DATASET_NAME>>", "\n".join([f"- {d}" for d in dataset])
          )
  
          assert "<<MODEL_ARCH>>" in content
          content = content.replace("<<MODEL_ARCH>>", model_arch)
  
          assert "<<MODEL_CONFIG>>" in content
          content = content.replace("<<MODEL_CONFIG>>", model_config)
  
          assert "<<TRAINING_LOGS>>" in content
          if not isinstance(training_logs, list):
              training_logs = [training_logs]
          content = content.replace(
              "<<TRAINING_LOGS>>",
              " and ".join(f"[zip]({t})" for t in training_logs),
          )
          content = content.replace("<<MODEL_EVAL>>", eval)
  
          assert "<<" not in content
          assert ">>" not in content
  
      with open(os.path.join(model_name, "README.md"), "w") as f:
          f.write(content)
      try:
          repo.commit("Update README.md")
          repo.push_to_hub()
      except Exception as e:
          print(str(e))
  
imports: import shutil
  import os
  import huggingface_hub
  import pytest
  import torch
  from transformers import AutoModelForCausalLM
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_model_cards(model_name, base_model, dataset, training_logs, eval) without return types