code: def test_ping():
      a1 = _generate_pod_args()
      a2 = set_ping_parser().parse_args(
          ["executor", f"0.0.0.0:{a1.port[0]}"]
      )
  
      a3 = set_ping_parser().parse_args(
          ["executor", f"0.0.0.1:{a1.port[0]}", "--timeout", "1000"]
      )
  
      with pytest.raises(SystemExit) as cm:
          with PodFactory.build_pod(a1):
              NetworkChecker(a2)
  
      assert cm.value.code == 0
  
      # test with bad address
      with pytest.raises(SystemExit) as cm:
          with PodFactory.build_pod(a1):
              NetworkChecker(a3)
  
      assert cm.value.code == 1
  
imports: import json
  import os
  import subprocess
  import pytest
  from jina.checker import NetworkChecker
  from jina.jaml import JAML
  from jina.orchestrate.pods.factory import PodFactory
  from jina.parsers import set_deployment_parser
  from jina.parsers.ping import set_ping_parser
  from jina_cli.autocomplete import ac_table
  from jina_cli.export import api_to_dict
  from jina_cli.lookup import _build_lookup_table, lookup_and_print
  from tests.helper import _generate_pod_args
label_desc: Use image node_id 12 for calling a global function with example usage: test_ping() without return types