code: def get_reward_model_from_args(
      model: str, pretrained: str = None, config=None
  ):
      if model == "gpt2":
          reward_model = GPTRM(pretrained=pretrained, config=config)
      elif model == "bloom":
          reward_model = BLOOMRM(pretrained=pretrained, config=config)
      elif model == "opt":
          reward_model = OPTRM(pretrained=pretrained, config=config)
      elif model == "llama":
          reward_model = LlamaRM(pretrained=pretrained, config=config)
      else:
          raise ValueError(f'Unsupported reward model "{model}"')
      return reward_model
  
imports: import os
  from collections import OrderedDict
  from typing import Any, Dict
  import torch
  import torch.distributed
  import torch.nn
  from coati.models.bloom import BLOOMRM, BLOOMActor, BLOOMCritic
  from coati.models.gpt import GPTRM, GPTActor, GPTCritic
  from coati.models.llama import LlamaActor, LlamaCritic, LlamaRM
  from coati.models.opt import OPTRM, OPTActor, OPTCritic
  from coati.trainer.strategies import DDPStrategy, GeminiStrategy, LowLevelZeroStrategy
  from transformers import AutoTokenizer, BloomTokenizerFast, GPT2Tokenizer
label_desc: Use image node_id 6 for calling a global function with example usage: get_reward_model_from_args(model, pretrained, config) and returns: reward_model