code: def update_data(input_data: InputData, mask: np.ndarray) -> InputData:
      """Method for updating target and features"""
  
      modified_input_data = copy(input_data)
      old_features = modified_input_data.features
      old_target = modified_input_data.target
      old_idx = modified_input_data.idx
  
      modified_input_data.features = old_features[mask]
      modified_input_data.target = old_target[mask]
      modified_input_data.idx = np.array(old_idx)[mask]
  
      return modified_input_data
  
imports: from copy import copy
  from typing import Optional
  import numpy
  import sklearn
  from golem.core.log import default_log
  from pkg_resources import parse_version
  from sklearn.ensemble import IsolationForest
  from sklearn.linear_model import LinearRegression, RANSACRegressor
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.tree import DecisionTreeRegressor
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import DataOperationImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
label_desc: Use image node_id 1 for calling a global function with example usage: update_data(input_data, mask) and returns: modified_input_data