docstr: Some internal functions are also tracked and should use the correct name.
docstr_tok: ["Some","internal","functions","are","also","tracked","and","should","use","the","correct","name","."]
code: def test_internal_api_commands(
      self, command: Callable[..., Any], expected_name: str
  ):
      """Some internal functions are also tracked and should use the correct name."""
      ctx = get_script_run_ctx()
      assert ctx is not None
  
      # This will always throw an exception because of missing arguments
      # This is fine since the command still get tracked
      with contextlib.suppress(Exception):
          command()
  
      self.assertGreater(
          len(ctx.tracked_commands),
          0,
          f"No command tracked for {expected_name}",
      )
  
      # Sometimes multiple commands are executed
      # so we check the full list of tracked commands
      self.assertIn(
          expected_name,
          [
              tracked_commands.name
              for tracked_commands in ctx.tracked_commands
          ],
          f"Command {expected_name} was not tracked.",
      )
  
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 6 for calling the PageTelemetryTest obj's underlying member method code with example usage: obj.test_internal_api_commands(command, expected_name) without return types