docstr: Display a code block with optional syntax highlighting.
  
  (This is a convenience wrapper around `st.markdown()`)
  
  Parameters
  ----------
  body : str
      The string to display as code.
  
  language : str or None
      The language that the code is written in, for syntax highlighting.
      If ``None``, the code will be unstyled. Defaults to ``"python"``.
  
      For a list of available ``language`` values, see:
  
      https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD
  
  Example
  -------
  >>> import streamlit as st
  >>>
  >>> code = '''def hello():
  ...     print("Hello, Streamlit!")'''
  >>> st.code(code, language='python')
code: def code(
      self,
      body: SupportsStr,
      language: Optional[str] = "python",
  ) -> "DeltaGenerator":
      """Display a code block with optional syntax highlighting.
  
      (This is a convenience wrapper around `st.markdown()`)
  
      Parameters
      ----------
      body : str
          The string to display as code.
  
      language : str or None
          The language that the code is written in, for syntax highlighting.
          If ``None``, the code will be unstyled. Defaults to ``"python"``.
  
          For a list of available ``language`` values, see:
  
          https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD
  
      Example
      -------
      >>> import streamlit as st
      >>>
      >>> code = '''def hello():
      ...     print("Hello, Streamlit!")'''
      >>> st.code(code, language='python')
  
      """
      code_proto = MarkdownProto()
      markdown = f'```{language or ""}\n{body}\n```'
      code_proto.body = clean_text(markdown)
      code_proto.element_type = MarkdownProto.Type.CODE
      return self.dg._enqueue("markdown", code_proto)
  
file_path: streamlit/lib/streamlit/elements/markdown.py
imports: from typing import TYPE_CHECKING, Optional, Union, cast
  from streamlit.proto.Markdown_pb2 import Markdown
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.string_util import clean_text
  from streamlit.type_util import SupportsStr, is_sympy_expession
label_desc: Use image node_id 2 for calling the MarkdownMixin obj's underlying member method code with example usage: obj.code(body, language) and returns: self