code: def sample_data(query, sample_count=10000):
      if sample_count > query.shape[0]:
          sample_count = query.shape[0]
  
      idx = random.sample(range(query.shape[0]), sample_count)
      sample_query = query[idx, :]
      return sample_query, idx
  
file_path: mars/mars/learn/proxima/simple_index/knn.py
imports: import random
  import pandas
  from ....None import dataframe
  from ....None import tensor
  from .None import build_index, search_index
label_desc: Use image node_id 1 for calling a global function with example usage: sample_data(query, sample_count) and returns: sample_query,  idx