code: def falcon_instruct_pt(messages):
      prompt = ""
      for message in messages:
          if message["role"] == "system":
              prompt += message["content"]
          else:
              prompt += (
                  message["role"]
                  + ":"
                  + message["content"]
                  .replace("\r\n", "\n")
                  .replace("\n\n", "\n")
              )
              prompt += "\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 6 for calling a global function with example usage: falcon_instruct_pt(messages) and returns: prompt