code: def phind_codellama_pt(messages):
      prompt = ""
      for message in messages:
          if message["role"] == "system":
              prompt += (
                  "### System Prompt\n" + message["content"] + "\n\n"
              )
          elif message["role"] == "user":
              prompt += (
                  "### User Message\n" + message["content"] + "\n\n"
              )
          elif message["role"] == "assistant":
              prompt += "### Assistant\n" + message["content"] + "\n\n"
      return prompt
  
imports: from enum import Enum
  import requests, traceback
  import json
  from jinja2 import Template, exceptions, Environment, meta
  from typing import Optional, Any
label_desc: Use image node_id 10 for calling a global function with example usage: phind_codellama_pt(messages) and returns: prompt