code: def fill_nonlin_stats_table_with_regex_result(
      groups, gate_index, stats_table
  ):
      iteration = int(groups[0])
      component_name = groups[1]
      component_type = groups[2]
      # for value-avg
      value_percentiles = groups[3 + gate_index * 6]
      value_mean = float(groups[4 + gate_index * 6])
      value_stddev = float(groups[5 + gate_index * 6])
      value_percentiles_split = re.split(",| ", value_percentiles)
      assert len(value_percentiles_split) == 13
      value_5th = float(value_percentiles_split[4])
      value_50th = float(value_percentiles_split[6])
      value_95th = float(value_percentiles_split[9])
      # for deriv-avg
      deriv_percentiles = groups[6 + gate_index * 6]
      deriv_mean = float(groups[7 + gate_index * 6])
      deriv_stddev = float(groups[8 + gate_index * 6])
      deriv_percentiles_split = re.split(",| ", deriv_percentiles)
      assert len(deriv_percentiles_split) == 13
      deriv_5th = float(deriv_percentiles_split[4])
      deriv_50th = float(deriv_percentiles_split[6])
      deriv_95th = float(deriv_percentiles_split[9])
  
      if len(groups) <= 9:
          try:
              if iteration in stats_table[component_name]["stats"]:
                  stats_table[component_name]["stats"][
                      iteration
                  ].extend(
                      [
                          value_mean,
                          value_stddev,
                          deriv_mean,
                          deriv_stddev,
                          value_5th,
                          value_50th,
                          value_95th,
                          deriv_5th,
                          deriv_50th,
                          deriv_95th,
                      ]
                  )
              else:
                  stats_table[component_name]["stats"][iteration] = [
                      value_mean,
                      value_stddev,
                      deriv_mean,
                      deriv_stddev,
                      value_5th,
                      value_50th,
                      value_95th,
                      deriv_5th,
                      deriv_50th,
                      deriv_95th,
                  ]
          except KeyError:
              stats_table[component_name] = {}
              stats_table[component_name]["type"] = component_type
              stats_table[component_name]["stats"] = {}
              stats_table[component_name]["stats"][iteration] = [
                  value_mean,
                  value_stddev,
                  deriv_mean,
                  deriv_stddev,
                  value_5th,
                  value_50th,
                  value_95th,
                  deriv_5th,
                  deriv_50th,
                  deriv_95th,
              ]
      else:
          # for oderiv-rms
          oderiv_percentiles = groups[9 + gate_index * 6]
          oderiv_mean = float(groups[10 + gate_index * 6])
          oderiv_stddev = float(groups[11 + gate_index * 6])
          oderiv_percentiles_split = re.split(",| ", oderiv_percentiles)
          assert len(oderiv_percentiles_split) == 13
          oderiv_5th = float(oderiv_percentiles_split[4])
          oderiv_50th = float(oderiv_percentiles_split[6])
          oderiv_95th = float(oderiv_percentiles_split[9])
          try:
              if iteration in stats_table[component_name]["stats"]:
                  stats_table[component_name]["stats"][
                      iteration
                  ].extend(
                      [
                          value_mean,
                          value_stddev,
                          deriv_mean,
                          deriv_stddev,
                          oderiv_mean,
                          oderiv_stddev,
                          value_5th,
                          value_50th,
                          value_95th,
                          deriv_5th,
                          deriv_50th,
                          deriv_95th,
                          oderiv_5th,
                          oderiv_50th,
                          oderiv_95th,
                      ]
                  )
              else:
                  stats_table[component_name]["stats"][iteration] = [
                      value_mean,
                      value_stddev,
                      deriv_mean,
                      deriv_stddev,
                      oderiv_mean,
                      oderiv_stddev,
                      value_5th,
                      value_50th,
                      value_95th,
                      deriv_5th,
                      deriv_50th,
                      deriv_95th,
                      oderiv_5th,
                      oderiv_50th,
                      oderiv_95th,
                  ]
          except KeyError:
              stats_table[component_name] = {}
              stats_table[component_name]["type"] = component_type
              stats_table[component_name]["stats"] = {}
              stats_table[component_name]["stats"][iteration] = [
                  value_mean,
                  value_stddev,
                  deriv_mean,
                  deriv_stddev,
                  oderiv_mean,
                  oderiv_stddev,
                  value_5th,
                  value_50th,
                  value_95th,
                  deriv_5th,
                  deriv_50th,
                  deriv_95th,
                  oderiv_5th,
                  oderiv_50th,
                  oderiv_95th,
              ]
  
imports: from __future__ import division
  from __future__ import print_function
  import traceback
  import datetime
  import logging
  import re
  import libs.common
label_desc: Use image node_id 1 for calling a global function with example usage: fill_nonlin_stats_table_with_regex_result(groups, gate_index, stats_table) without return types