code: def create_index_flat():
      # create index
      default_flat_index = {
          "index_type": "FLAT",
          "params": {},
          "metric_type": "L2",
      }
      all_col_list = list_collections()
      col_list = []
      for col_name in all_col_list:
          if (
              "FLAT" in col_name
              and "task" in col_name
              and "IVF" not in col_name
          ):
              col_list.append(col_name)
      logger.info("\nCreate index for FLAT...")
      for col_name in col_list:
          c = Collection(name=col_name)
          logger.info(c)
          try:
              replicas = c.get_replicas()
              replica_number = len(replicas.groups)
              c.release()
          except Exception as e:
              replica_number = 0
              logger.info(e)
          t0 = time.time()
          c.create_index(
              field_name="float_vector", index_params=default_flat_index
          )
          logger.info(f"create index time: {time.time() - t0:.4f}")
          if replica_number > 0:
              c.load(replica_number=replica_number)
  
file_path: milvus/tests/python_client/deploy/scripts/utils.py
imports: import sys
  import copy
  import time
  from loguru import logger
  import pymilvus
  from pymilvus import FieldSchema, CollectionSchema, DataType, Collection, list_collections
label_desc: Use image node_id 5 for calling a global function with example usage: create_index_flat() without return types