class_docstr: Test server
class_docstr_tok: ["Test","server"]
code: def test_ndarray_io(self):
      service = api_service.APIService(desc="test")
  
      arr = np.random.rand(1024)
  
      @service.api(path="/echo", output_model=NDARRAY())
      def test(arr: "ndarray"):
          return arr
  
      server = HTTPServer(service)
      client = TestClient(server.app)
      response = client.post("/echo", content=to_json(arr))
      self.assertTrue(
          isinstance(from_json(response.content), np.ndarray)
      )
  
file_path: towhee/tests/unittests/serve/http/test_http.py
imports: import unittest
  import typing
  from pydantic import BaseModel
  import numpy
  from towhee.utils.thirdparty.fastapi_utils import fastapi
  from fastapi.testclient import TestClient
  from towhee import api_service, pipe
  from towhee.serve.http.server import HTTPServer
  from towhee.serve.io import JSON, NDARRAY, BYTES
  from towhee.utils.serializer import to_json, from_json
label_desc: Use image node_id 5 for calling the TestHTTPServer obj's underlying member method code with example usage: obj.test_ndarray_io() and returns: arr