code: def __init__(
      self, method, header=None, param=None, model=None, keep_one=True
  ):
      self.method = method
      self.param = param
      self.filter_conf = {}
  
      if param is not None:
          for metric_name, filter_type, threshold, take_high in zip(
              self.param.get("metrics", DEFAULT_METRIC.get(method)),
              self.param.get("filter_type", ["threshold"]),
              self.param.get("threshold", [1.0]),
              self.param.get("take_high", [True]),
          ):
              metric_conf = self.filter_conf.get(metric_name, {})
              metric_conf["filter_type"] = metric_conf.get(
                  "filter_type", []
              ) + [filter_type]
              metric_conf["threshold"] = metric_conf.get(
                  "threshold", []
              ) + [threshold]
              metric_conf["take_high"] = metric_conf.get(
                  "take_high", []
              ) + [take_high]
              self.filter_conf[metric_name] = metric_conf
  
      self.model = self.convert_model(model)
      self.keep_one = keep_one
      self._header = header
      self._selected_mask = None
      self._all_selected_mask = None
      if header is None:
          self._prev_selected_mask = None
      else:
          self._prev_selected_mask = pd.Series(
              np.ones(len(header)), dtype=bool, index=header
          )
      self._host_selected_mask = {}
      self._all_host_selected_mask = {}
      self._host_prev_selected_mask = {}
      self._all_metrics = None
      self._all_host_metrics = {}
  
imports: import copy
  import logging
  import math
  import random
  import numpy
  import pandas
  from fate.arch import Context
  from ..abc.module import HeteroModule, Module
label_desc: Use image node_id 1 to create a new StandardSelection object from inherited base classes: Module with example: obj = StandardSelection(method, header, param, model, keep_one)