docstr: Test creating the page profile message via create_page_profile_message.
docstr_tok: ["Test","creating","the","page","profile","message","via","create_page_profile_message","."]
code: def test_create_page_profile_message(self):
      """Test creating the page profile message via create_page_profile_message."""
      forward_msg = metrics_util.create_page_profile_message(
          commands=[
              metrics_util._get_command_telemetry(
                  st.dataframe, "dataframe", pd.DataFrame(), width=250
              )
          ],
          exec_time=1000,
          prep_time=2000,
      )
  
      self.assertEqual(len(forward_msg.page_profile.commands), 1)
      self.assertEqual(forward_msg.page_profile.exec_time, 1000)
      self.assertEqual(forward_msg.page_profile.prep_time, 2000)
      self.assertEqual(
          forward_msg.page_profile.commands[0].name, "dataframe"
      )
  
imports: import contextlib
  import datetime
  import unittest
  from collections import Counter
  from typing import Any, Callable
  from unittest.mock import MagicMock, mock_open, patch
  import pandas
  from parameterized import parameterized
  import streamlit
  import streamlit.components.v1
  from streamlit.connections import SnowparkConnection, SQLConnection
  from streamlit.runtime import metrics_util
  from streamlit.runtime.caching import cache_data_api, cache_resource_api
  from streamlit.runtime.legacy_caching import caching
  from streamlit.runtime.scriptrunner import get_script_run_ctx, magic_funcs
  from streamlit.web.server import websocket_headers
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 4 for calling the PageTelemetryTest obj's underlying member method code with example usage: obj.test_create_page_profile_message() without return types