code: def is_multi_output_task(train_data):
      target_shape = train_data.target.shape
      is_multi_target = len(target_shape) > 1 and target_shape[1] > 1
      return is_multi_target
  
imports: import warnings
  from abc import abstractmethod
  from typing import Optional
  import numpy
  from golem.core.log import default_log
  from lightgbm.sklearn import LGBMClassifier, LGBMRegressor
  from sklearn.cluster import KMeans
  from sklearn.ensemble import AdaBoostRegressor, ExtraTreesRegressor, GradientBoostingRegressor, RandomForestClassifier, RandomForestRegressor
  from sklearn.linear_model import Lasso, LinearRegression, LogisticRegression, Ridge, SGDRegressor
  from sklearn.multioutput import MultiOutputClassifier, MultiOutputRegressor
  from sklearn.naive_bayes import BernoulliNB, MultinomialNB
  from sklearn.neural_network import MLPClassifier
  from sklearn.svm import LinearSVR
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from xgboost import XGBClassifier, XGBRegressor
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.operation_types_repository import OperationTypesRepository, get_operation_type_from_id
  from fedot.core.repository.tasks import TaskTypesEnum
  from fedot.utilities.custom_errors import AbstractMethodNotImplementError
  from fedot.utilities.random import ImplementationRandomStateHandler
label_desc: Use image node_id 2 for calling a global function with example usage: is_multi_output_task(train_data) and returns: is_multi_target