code: def test_promptlayer_logging_with_metadata():
      try:
          # Redirect stdout
          old_stdout = sys.stdout
          sys.stdout = new_stdout = io.StringIO()
  
          response = completion(
              model="gpt-3.5-turbo",
              messages=[{"role": "user", "content": "Hi 👋 - i'm ai21"}],
              temperature=0.2,
              max_tokens=20,
              metadata={"model": "ai21"},
          )
  
          # Restore stdout
          time.sleep(1)
          sys.stdout = old_stdout
          output = new_stdout.getvalue().strip()
          print(output)
          if "LiteLLM: Prompt Layer Logging: success" not in output:
              raise Exception("Required log message not found!")
  
      except Exception as e:
          print(e)
  
imports: import sys
  import os
  import io
  from litellm import completion
  import litellm
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: test_promptlayer_logging_with_metadata() without return types