    def write_to_textfile(self, path: str) -> None:
        """
        Write metrics to given path. This is intended to be used with
        the Node expoerter textfile collector.

        Args:
            path: path to write the metrics to. This file must end
                with '.prom' for the textfile collector to process it.
        """
        self.prometheus_client.write_to_textfile(path, registry=self.registry)
Write metrics to given path. This is intended to be used with
the Node expoerter textfile collector.

Args:
path: path to write the metrics to. This file must end
with '.prom' for the textfile collector to process it.
src/bentoml/_internal/server/metrics/prometheus.py