code: def function_call_prompt(messages: list, functions: list):
      function_prompt = "Produce JSON OUTPUT ONLY! The following functions are available to you:"
      for function in functions:
          function_prompt += f"""\n{function}\n"""
  
      function_added_to_prompt = False
      for message in messages:
          if "system" in message["role"]:
              message["content"] += f"""{function_prompt}"""
              function_added_to_prompt = True
  
      if function_added_to_prompt == False:
          messages.append(
              {"role": "system", "content": f"""{function_prompt}"""}
          )
  
      return messages
  
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 19 for calling a global function with example usage: function_call_prompt(messages, functions) and returns: messages