class_docstr: Unit test for triton client.
class_docstr_tok: ["Unit","test","for","triton","client","."]
code: def test_single_params(self):
      p = (
          pipe.input("num")
          .map("num", "arr", lambda x: x * 10)
          .map(("num", "arr"), "ret", lambda x, y: x + y)
          .output("ret")
      )
      MockInferenceServerClient.set_pipeline(p)
  
      url = "127.0.0.1:8000"
      with triton_client.Client(url) as client:
          res1 = client(1)
          self.assertEqual(len(res1), 1)
          expect1 = [11]
          for index, item in enumerate(res1[0], 0):
              self.assertEqual(item, expect1[index])
  
          res2 = client.batch([1, 2, 3])
          self.assertEqual(len(res2), 3)
          expect2 = [[11], [22], [33]]
          for index, single in enumerate(res2):
              for item in single:
                  self.assertEqual(item, expect2[index])
  
imports: from typing import List
  import unittest
  from unittest import mock
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import numpy
  from towhee import pipe
  from towhee.serve.triton import triton_client
  from towhee.utils.thirdparty.dill_util import dill
  import towhee.serve.triton.bls.pipeline_model
  from towhee.serve.triton.bls.python_backend_wrapper import pb_utils
  from towhee.utils.serializer import from_json
label_desc: Use image node_id 2 for calling the TestTritonClient obj's underlying member method code with example usage: obj.test_single_params() without return types