code: def infer_ml_task(y):
      """
      Infer the machine learning task to select for.
      The result will be either `'regression'` or `'classification'`.
      If the target vector only consists of integer typed values or objects, we assume the task is `'classification'`.
      Else `'regression'`.
  
      :param y: The target vector y.
      :type y: pandas.Series
      :return: 'classification' or 'regression'
      :rtype: str
      """
      if (
          y.dtype.kind in np.typecodes["AllInteger"]
          or y.dtype == object
      ):
          ml_task = "classification"
      else:
          ml_task = "regression"
  
      return ml_task
  
file_path: tsfresh/tsfresh/feature_selection/relevance.py
imports: import warnings
  from functools import partial, reduce
  from multiprocessing import Pool
  import numpy
  import pandas
  from statsmodels.stats.multitest import multipletests
  from tsfresh import defaults
  from tsfresh.feature_selection.significance_tests import target_binary_feature_binary_test, target_binary_feature_real_test, target_real_feature_binary_test, target_real_feature_real_test
  from tsfresh.utilities.distribution import initialize_warnings_in_workers
label_desc: Use image node_id 3 for calling a global function with example usage: infer_ml_task(y) and returns: ml_task