code: def get_conv_and_role(model_name):
      if "llama-2" in model_name.lower():
          conv_mode = "llava_llama_2"
      elif "v1" in model_name.lower():
          conv_mode = "llava_v1"
      elif "mpt" in model_name.lower():
          conv_mode = "mpt"
      else:
          conv_mode = "llava_v0"
  
      conv = conv_templates[conv_mode].copy()
      if "mpt" in model_name.lower():
          roles = ("user", "assistant")
      else:
          roles = conv.roles
  
      return conv, roles
  
file_path: BigDL/python/llm/example/GPU/PyTorch-Models/Model/llava/generate.py
imports: import argparse
  import torch
  import time
  from transformers import AutoModelForCausalLM
  from llava.model.language_model.llava_llama import LlavaLlamaForCausalLM
  from transformers import AutoTokenizer
  from llava.constants import DEFAULT_IMAGE_PATCH_TOKEN, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
  from llava.conversation import conv_templates, SeparatorStyle
  from llava.utils import disable_torch_init
  from llava.mm_utils import process_images, tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria
  from bigdl.llm import optimize_model
label_desc: Use image node_id 2 for calling a global function with example usage: get_conv_and_role(model_name) and returns: conv,  roles