code: def compute_federated_metrics(self, ctx: Context, binned_data):
      logger.info(f"Start computing federated metrics.")
      pk = ctx.guest.get("pk")
      evaluator = ctx.guest.get("evaluator")
      coder = ctx.guest.get("coder")
      columns = binned_data.schema.columns.to_list()
      # logger.info(f"self.bin_col: {self.bin_col}")
      to_compute_col = self.bin_col + self.category_col
      anonymous_col_bin = [
          binned_data.schema.anonymous_columns[columns.index(col)]
          for col in to_compute_col
      ]
  
      ctx.guest.put("anonymous_col_bin", anonymous_col_bin)
      encrypt_y = ctx.guest.get("enc_y")
      # event count:
      feature_bin_sizes = [
          self._bin_obj._bin_count_dict[col] for col in self.bin_col
      ]
      if self.category_col:
          for col in self.category_col:
              category_bin_size = (
                  binned_data[col].get_dummies().shape[1]
              )
              feature_bin_sizes.append(category_bin_size)
      to_compute_data = binned_data[to_compute_col]
      to_compute_data.rename(
          columns=dict(
              zip(
                  to_compute_data.schema.columns,
                  to_compute_data.schema.anonymous_columns,
              )
          )
      )
      hist_targets = binned_data.create_frame()
      hist_targets["event_count"] = encrypt_y
      hist_targets["non_event_count"] = 1
      dtypes = hist_targets.dtypes
  
      hist_schema = {
          "event_count": {
              "type": "ciphertext",
              "stride": 1,
              "pk": pk,
              "evaluator": evaluator,
              "coder": coder,
              "dtype": dtypes["event_count"],
          },
          "non_event_count": {
              "type": "plaintext",
              "stride": 1,
              "dtype": dtypes["non_event_count"],
          },
      }
      hist = HistogramBuilder(
          num_node=1,
          feature_bin_sizes=feature_bin_sizes,
          value_schemas=hist_schema,
          enable_cumsum=False,
      )
      event_non_event_count_hist = (
          to_compute_data.distributed_hist_stat(
              histogram_builder=hist, targets=hist_targets
          )
      )
      event_non_event_count_hist.i_sub_on_key(
          "non_event_count", "event_count"
      )
      ctx.guest.put(
          "event_non_event_count", (event_non_event_count_hist)
      )
      ctx.guest.put("feature_bin_sizes", feature_bin_sizes)
  
imports: import logging
  import numpy
  import pandas
  from fate.arch import Context
  from fate.arch.histogram import HistogramBuilder
  from ..abc.module import HeteroModule, Module
label_desc: Use image node_id 5 for calling the HeteroBinningModuleHost obj's underlying member method code with example usage: obj.compute_federated_metrics(ctx, binned_data) without return types