code: def run_search(
      existing_samples: typing.Set[MatmulSize],
  ) -> typing.Sequence[MatmulTiming]:
      """Run search on a list of matmul configurations."""
      samples: typing.Sequence[MatmulSize] = [
          s for s in generate_samples() if s not in existing_samples
      ]
      t0 = time.time()
      shared_stream = torch.cuda.Stream()
      tilings = generate_tiling_configs(
          parse_int_list(_TILINGS_M.value),
          parse_int_list(_TILINGS_N.value),
          parse_int_list(_TILINGS_K.value),
          parse_layout_list(_LHS_LAYOUTS.value),
          parse_layout_list(_RHS_LAYOUTS.value),
          parse_layout_list(_RESULT_LAYOUTS.value),
          parse_int_list(_SPLIT_KS.value),
          parse_int_list(_NUM_STAGES.value),
          parse_int_list(_NUM_WARPS.value),
      )
  
      with concurrent.futures.ThreadPoolExecutor(
          max_workers=_MAX_WORKERS.value
      ) as executor:
          pbar = tqdm.tqdm(total=len(samples) * len(tilings), ncols=0)
          results = []
          with logging_redirect_tqdm():
              if _MAX_WORKERS.value == 1:
                  for c in samples:
                      res = benchmark_matmul(
                          c,
                          pbar,
                          shared_stream,
                          tilings,
                          _REPETITIONS_MS.value,
                      )
                      results.extend(res)
                      write_timings(res)
              else:
                  future_to_dims = {
                      executor.submit(
                          benchmark_matmul,
                          c,
                          pbar,
                          shared_stream,
                          tilings,
                          _REPETITIONS_MS.value,
                      ): c
                      for c in samples
                  }
                  for future in concurrent.futures.as_completed(
                      future_to_dims
                  ):
                      res = future.result()
                      results.extend(res)
                      write_timings(res)
  
          pbar.close()
  
      LOG.info(
          "%d datapoints generated in %.2fs",
          len(results),
          (time.time() - t0),
      )
      return results
  
imports: import concurrent.futures
  import csv
  import itertools
  import logging
  import os
  import random
  import sys
  import time
  import typing
  from absl import app
  from absl import flags
  from matmul_lib import benchmark_matmul
  from matmul_lib import generate_tiling_configs
  from matmul_lib import MatmulSize
  from matmul_lib import MatmulTiming
  from matmul_lib import parse_int_list
  from matmul_lib import parse_layout_list
  from matmul_lib import QuantizedInputType
  import numpy
  import torch
  import tqdm
  from tqdm.contrib.logging import logging_redirect_tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: run_search(existing_samples) and returns: results