code: def from_columns(columns, columns_to_ignore=None):
      """
      Creates a mapping from kind names to fc_parameters objects
      (which are itself mappings from feature calculators to settings)
      to extract only the features contained in the columns.
      To do so, for every feature name in columns this method
  
      1. split the column name into col, feature, params part
      2. decide which feature we are dealing with (aggregate with/without params or apply)
      3. add it to the new name_to_function dict
      4. set up the params
  
      :param columns: containing the feature names
      :type columns: list of str
      :param columns_to_ignore: columns which do not contain tsfresh feature names
      :type columns_to_ignore: list of str
  
      :return: The kind_to_fc_parameters object ready to be used in the extract_features function.
      :rtype: dict
      """
  
      kind_to_fc_parameters = {}
  
      if columns_to_ignore is None:
          columns_to_ignore = []
  
      for col in columns:
          if col in columns_to_ignore:
              continue
  
          if not isinstance(col, str):
              raise TypeError(
                  "Column name {} should be a string or unicode".format(
                      col
                  )
              )
  
          # Split according to our separator into <col_name>, <feature_name>, <feature_params>
          parts = col.split("__")
          n_parts = len(parts)
  
          if n_parts == 1:
              raise ValueError(
                  "Splitting of columnname {} resulted in only one part.".format(
                      col
                  )
              )
  
          kind = parts[0]
          feature_name = parts[1]
  
          if kind not in kind_to_fc_parameters:
              kind_to_fc_parameters[kind] = {}
  
          if not hasattr(feature_calculators, feature_name):
              raise ValueError(
                  "Unknown feature name {}".format(feature_name)
              )
  
          config = get_config_from_string(parts)
          if config:
              if feature_name in kind_to_fc_parameters[kind]:
                  kind_to_fc_parameters[kind][feature_name].append(
                      config
                  )
              else:
                  kind_to_fc_parameters[kind][feature_name] = [config]
          else:
              kind_to_fc_parameters[kind][feature_name] = None
  
      return kind_to_fc_parameters
  
imports: import logging
  from builtins import range
  from collections import UserDict
  from inspect import getfullargspec
  from itertools import product
  import cloudpickle
  import pandas
  from tsfresh.feature_extraction import feature_calculators
  from tsfresh.utilities.string_manipulation import get_config_from_string
label_desc: Use image node_id 1 for calling a global function with example usage: from_columns(columns, columns_to_ignore) and returns: kind_to_fc_parameters