code: def test_prometheus_interface(port_generator):
      class DummyExecutor(Executor):
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
              self.summary = Summary(
                  "a", "A", registry=self.runtime_args.metrics_registry
              )
  
          @requests(on="/foo")
          def foo(self, docs, **kwargs):
              with self.summary.time():
                  ...
  
      port = port_generator()
      with Flow(monitoring=True, port_monitoring=port_generator()).add(
          uses=DummyExecutor, monitoring=True, port_monitoring=port
      ) as f:
          f.post("/foo", inputs=DocumentArray.empty(4))
  
          resp = req.get(f"http://localhost:{port}/")
          assert (
              f"a_count 1.0"
              in str(  # check that we count 4 documents on foo
                  resp.content
              )
          )
  
imports: import requests
  from docarray import DocumentArray
  from prometheus_client import Summary
  from jina import Executor, Flow, monitor, requests
label_desc: Use image node_id 1 for calling a global function with example usage: test_prometheus_interface(port_generator) without return types