docstr_tok: []
code: def test_collection_create_by_restful_search_vector_by_sdk(self):
      """ """
      name = gen_collection_name()
      dim = 128
      # insert data by restful
      self.init_collection(name, metric_type="L2", dim=dim)
      time.sleep(5)
      # search data by sdk
      collection = Collection(name=name)
      nq = 5
      vectors_to_search = [
          [random.random() for i in range(dim)] for j in range(nq)
      ]
      res = collection.search(
          data=vectors_to_search,
          anns_field="vector",
          param={},
          limit=10,
      )
      assert len(res) == nq
      assert len(res[0]) == 10
  
file_path: milvus/tests/restful_client/testcases/test_restful_sdk_mix_use_scenario.py
imports: import random
  import time
  from utils.utils import gen_collection_name
  from utils.util_log import test_log
  import pytest
  from base.testbase import TestBase
  from pymilvus import FieldSchema, CollectionSchema, DataType, Collection
label_desc: Use image node_id 8 for calling the TestRestfulSdkCompatibility obj's underlying member method code with example usage: obj.test_collection_create_by_restful_search_vector_by_sdk() without return types