code: def converge_func_factory(early_stop, tol):
      # try:
      #     converge_func = param.converge_func
      #     eps = param.eps
      # except AttributeError:
      #     raise AttributeError("Converge Function parameters has not been totally set")
  
      if early_stop == "diff":
          return _DiffConverge(tol)
      elif early_stop == "weight_diff":
          return _WeightDiffConverge(tol)
      elif early_stop == "abs":
          return _AbsConverge(tol)
      else:
          raise NotImplementedError(
              "Converge Function method cannot be recognized: {}".format(
                  early_stop
              )
          )
  
file_path: FATE/python/fate/ml/utils/_convergence.py
imports: import logging
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: converge_func_factory(early_stop, tol) and returns: _DiffConverge, _WeightDiffConverge, _AbsConverge