code: def check_model_family(
      config1: ConfigType, config2: ConfigType
  ) -> bool:
      """Check if the model family is the same for the two configs
      the model family is specified in the config.model
  
      Args:
          config1 (ConfigType): First config
          config2 (ConfigType): Second config
  
      Returns:
          bool: True if the model family is the same, False otherwise
      """
  
      # check if both are an hugging face models
      if (config1.model in hf_models) and (config2.model in hf_models):
          # if there is a "/" remove it from the name
          model_name1 = config1.model
          model_name2 = config2.model
          if "/" in model_name1:
              model_name1 = model_name1.split("/")[1]
          if "/" in model_name2:
              model_name2 = model_name2.split("/")[1]
  
          # check if the model family is the same
          return model_name1.split("-")[0] == model_name2.split("-")[0]
  
      # check if both are not an hugging face models
      elif (config1.model not in hf_models) and (
          config2.model not in hf_models
      ):
          # for now they could be only LLaMA models
          return True
      else:
          return False
  
imports: import json
  import os
  import random
  from collections import deque, namedtuple
  import deepspeed
  import torch
  import torch.distributed
  from accelerate import Accelerator
  from beartype import beartype
  from beartype.typing import Deque, List, Tuple, Union
  from deepspeed.runtime.engine import DeepSpeedEngine
  from torch.utils.data import DataLoader, Dataset
  from torch.optim.lr_scheduler import CosineAnnealingWarmRestarts
  from chatllama.rlhf.actor import ActorModel
  from chatllama.rlhf.config import Config, ConfigActor, ConfigCritic, ConfigReward
  from chatllama.rlhf.model_list import hf_models
  from chatllama.rlhf.model_loader import ModelLoader
  from chatllama.rlhf.reward import RewardModel, CriticModel
  from chatllama.rlhf.utils import TrainingStats, ConversationLog
label_desc: Use image node_id 2 for calling a global function with example usage: check_model_family(config1, config2) and returns: unknown, True, False