code: def train(
      ctx,
      train_data,
      train_output_data,
      output_model,
      method,
      feature_range,
      scale_col,
      scale_idx,
      strict_range,
      use_anonymous,
  ):
      logger.info(f"start scale train")
      from fate.ml.preprocessing import FeatureScale
  
      train_data = train_data.read()
  
      sub_ctx = ctx.sub_ctx("train")
      columns = train_data.schema.columns.to_list()
      anonymous_columns = None
      if use_anonymous:
          anonymous_columns = (
              train_data.schema.anonymous_columns.to_list()
          )
          if method != "min_max":
              feature_range = None
      scale_col, feature_range = get_to_scale_cols(
          columns,
          anonymous_columns,
          scale_col,
          scale_idx,
          feature_range,
      )
  
      scaler = FeatureScale(
          method, scale_col, feature_range, strict_range
      )
      scaler.fit(sub_ctx, train_data)
  
      model = scaler.get_model()
      output_model.write(model, metadata={})
  
      sub_ctx = ctx.sub_ctx("predict")
      output_data = scaler.transform(sub_ctx, train_data)
      train_output_data.write(output_data)
  
file_path: FATE/python/fate/components/components/feature_scale.py
imports: import logging
  from typing import List, Union
  from fate.arch import Context
  from fate.components.core import GUEST, HOST, Role, cpn, params
label_desc: Use image node_id 4 for calling a global function with example usage: train(ctx, train_data, train_output_data, output_model, method, feature_range, scale_col, scale_idx, strict_range, use_anonymous) without return types