code: def _convert_newlines(text: str) -> str:
      """Convert newline characters to markdown newline sequences
      (space, space, newline).
      """
      return text.replace("\n", "  \n")
  
imports: from __future__ import annotations
  import time
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional
  from langchain.callbacks.base import BaseCallbackHandler
  from langchain.schema import AgentAction, AgentFinish, LLMResult
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_newlines(text) and returns: text