code: def test_deprecated_metric_byte_size(executor, port_generator):
      port0 = port_generator()
      port1 = port_generator()
  
      with Flow(monitoring=True, port_monitoring=port0).add(
          uses=executor, port_monitoring=port1
      ) as f:
          f.post("/foo", inputs=DocumentArray.empty(size=1))
  
          raw_metrics_executor = req.get(
              f"http://localhost:{port1}/"
          ).content.decode()
          raw_metrics_gateway = req.get(
              f"http://localhost:{port0}/"
          ).content.decode()
  
      metrics_executor = get_metric_values(raw_metrics_executor)
      metrics_gateway = get_metric_values(raw_metrics_gateway)
  
      assert (
          metrics_gateway[
              'jina_request_size_bytes_sum{runtime_name="gateway/rep-0"}'
          ]
          == metrics_gateway[
              'jina_received_request_bytes_sum{runtime_name="gateway/rep-0"}'
          ]
      )
      assert (
          metrics_executor[
              'jina_request_size_bytes_sum{executor="DummyExecutor",executor_endpoint="/foo",runtime_name="executor0/rep-0"}'
          ]
          == metrics_executor[
              'jina_received_request_bytes_sum{executor="DummyExecutor",executor_endpoint="/foo",runtime_name="executor0/rep-0"}'
          ]
      )
  
file_path: jina/tests/integration/monitoring/test_request_size.py
imports: import pytest
  import requests
  from docarray import DocumentArray
  from jina import Executor, Flow, requests
  from .None import get_metric_values
label_desc: Use image node_id 4 for calling a global function with example usage: test_deprecated_metric_byte_size(executor, port_generator) without return types