code: def handle_filling(preprocess, df, target):
      result = []
      null_indicies = None
      if preprocess["fill"] == "ALL":
          null_indicies = df.index[df.isnull().any(axis=1)].tolist()
          df = df.dropna()
      else:
          if "column" not in preprocess["fill"]:
              raise Exception(
                  "A target column should be specified with the -- column -- command."
              )
          if "target" not in preprocess["fill"]:
              target = "nan"
          else:
              target = preprocess["fill"]["target"]
  
          if "tactic" not in preprocess["fill"]:
              tactic = "mean"
          else:
              tactic = preprocess["fill"]["tactic"]
  
          columns = preprocess["fill"]["column"]
          if isinstance(columns, str):
              columns = [columns]
  
          for column in columns:
              column_transformed = np.array(df[column]).reshape(-1, 1)
              imputer = SimpleImputer(
                  missing_values=(
                      np.nan if target == "nan" else target
                  ),
                  strategy=tactic,
              )
              data = np.array(df[column]).reshape(-1, 1)
              fitted = imputer.fit(data)
              df[column] = fitted.transform(data)
              if column == target:
                  result.append(fitted)
  
      result.append(df)
      result.append(null_indicies)
      return result
  
imports: from pandas.api.types import is_numeric_dtype
  import numpy
  import pandas
  from sklearn.compose import ColumnTransformer
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.pipeline import Pipeline
  from nltk.stem import WordNetLemmatizer
  from nltk.tokenize import word_tokenize
  from nltk.corpus import stopwords
  from autocorrect import Speller
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.preprocessing import OrdinalEncoder
  from sklearn.impute import SimpleImputer
  from sklearn.ensemble import RandomForestRegressor
  from nylon.preprocessing.preprocessing import process_dates
  from sklearn.preprocessing import OneHotEncoder, StandardScaler, FunctionTransformer, LabelEncoder
label_desc: Use image node_id 5 for calling a global function with example usage: handle_filling(preprocess, df, target) and returns: result