class_docstr: GRPCServer test
class_docstr_tok: ["GRPCServer","test"]
code: def test_numpy(self):
      p = (
          pipe.input("nums")
          .flat_map("nums", "num", lambda x: x)
          .map("nums", "nums", lambda x: np.random.rand(1024))
          .output("nums", "num")
      )
  
      self.server = GRPCServer(
          api_service.build_service((p, "/numpys"))
      )
  
      self.server.start("localhost", 50001)
      client = Client("localhost", 50001)
  
      response = client("/numpys", [1, 2, 3])
      content = from_json(response.content)
      self.assertEqual(content[0][1], 1)
      self.assertEqual(content[1][1], 2)
      self.assertEqual(content[2][1], 3)
  
      async def run_async():
          aclient = AsyncClient("localhost", 50001)
          response = await aclient("/numpys", [1, 2, 3])
          content = from_json(response.content)
          self.assertEqual(content[0][1], 1)
          self.assertEqual(content[1][1], 2)
          self.assertEqual(content[2][1], 3)
          await aclient.close()
  
      asyncio.run(run_async())
  
imports: import unittest
  import typing
  import asyncio
  from pydantic import BaseModel
  import numpy
  from towhee import api_service, pipe
  from towhee.serve.grpc.server import GRPCServer
  from towhee.serve.grpc.client import Client, AsyncClient
  from towhee.serve.io import JSON, NDARRAY, BYTES
  from towhee.utils.serializer import from_json
label_desc: Use image node_id 6 for calling the TestGRPC obj's underlying member method code with example usage: obj.test_numpy() without return types