code: def spec_hierarchy_from_list(col_list):
      """Gets the hierarchy spec from the list of hierarchy cols"""
      spec = [["Total"]]
      for i in range(len(col_list)):
          spec.append(["Total"] + col_list[: i + 1])
      return spec
  
file_path: mindsdb/mindsdb/integrations/utilities/time_series_utils.py
imports: import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from sklearn.metrics import r2_score
  from mindsdb.utilities import log
label_desc: Use image node_id 6 for calling a global function with example usage: spec_hierarchy_from_list(col_list) and returns: spec