code: def collect_data(df: DataFrame, num=100):
      data = []
      fields_loc = df.data_manager.get_fields_loc()
      for block_id, blocks in df.block_table.collect():
          data_list = transform_block_to_list(blocks, fields_loc)
  
          if len(data) + len(data_list) <= num:
              data.extend(data_list)
          else:
              data.extend(data_list[:num])
  
          num -= len(data_list)
  
          if num <= 0:
              break
  
      return data
  
label_desc: Use image node_id 1 for calling a global function with example usage: collect_data(df, num) and returns: data