code: def get(self) -> None:
      if self.request.uri and "_stcore/" not in self.request.uri:
          emit_endpoint_deprecation_notice(
              self, new_path="/_stcore/metrics"
          )
  
      stats = self._manager.get_stats()
  
      # If the request asked for protobuf output, we return a serialized
      # protobuf. Else we return text.
      if "application/x-protobuf" in self.request.headers.get_list(
          "Accept"
      ):
          self.write(self._stats_to_proto(stats).SerializeToString())
          self.set_header("Content-Type", "application/x-protobuf")
          self.set_status(200)
      else:
          self.write(self._stats_to_text(self._manager.get_stats()))
          self.set_header(
              "Content-Type", "application/openmetrics-text"
          )
          self.set_status(200)
  
file_path: streamlit/lib/streamlit/web/server/stats_request_handler.py
imports: from typing import List
  import tornado.web
  from streamlit.proto.openmetrics_data_model_pb2 import GAUGE
  from streamlit.proto.openmetrics_data_model_pb2 import MetricSet
  from streamlit.runtime.stats import CacheStat, StatsManager
  from streamlit.web.server.server_util import emit_endpoint_deprecation_notice
label_desc: Use image node_id 4 for calling the StatsRequestHandler obj's underlying member method code with example usage: obj.get() without return types