code: def update_results(m, f, key, b, s):
      """
      Input
      * m = machines
      * f = features
      * key = cluster ID
      * b = biclique answer
      * s = stats answer
  
      Returns
      -------
      B : cudf.DataFrame
          A dataframe containing the list of machine and features.  This is not
      the full edge list to save space. Since it is a biclique, it is ease
      to recreate the edges
  
          B['id']    - a cluster ID (this is a one up number - up to k)
          B['vert']  - the vertex ID
          B['type']  - 0 == machine, 1 == feature
  
  
      S : cudf.DataFrame
          A Pandas dataframe of statistics on the returned info.
          This dataframe is (relatively small) of size k.
  
          S['id']       - the cluster ID
          S['total']    - total vertex count
          S['machines'] - number of machine nodes
          S['features'] - number of feature vertices
          S['bad_ratio'] - the ratio of bad machine / total machines
      """
      B = cudf.DataFrame()
      S = cudf.DataFrame()
  
      m_df = cudf.DataFrame()
      m_df["vert"] = m["src"]
      m_df["id"] = int(key)
      m_df["type"] = int(0)
  
      f_df = cudf.DataFrame()
      f_df["vert"] = f["dst"].astype(np.int32)
      f_df["id"] = int(key)
      f_df["type"] = int(1)
  
      if len(b) == 0:
          B = cudf.concat([m_df, f_df])
      else:
          B = cudf.concat([b, m_df, f_df])
  
      # now update the stats
      num_m = len(m_df)
      num_f = len(f_df)
      total = num_m + num_f
  
      num_bad = len(m.query("flag == 1"))
      ratio = num_bad / total
  
      # now stats
      s_tmp = cudf.DataFrame()
      s_tmp["id"] = key
      s_tmp["total"] = total
      s_tmp["machines"] = num_m
      s_tmp["features"] = num_f
      s_tmp["bad_ratio"] = ratio
  
      if len(s) == 0:
          S = s_tmp
      else:
          S = cudf.concat([s, s_tmp])
  
      del m_df
      del f_df
  
      return B, S
  
file_path: cugraph/python/cugraph/cugraph/experimental/structure/bicliques.py
imports: import cudf
  import numpy
  from collections import OrderedDict
label_desc: Use image node_id 7 for calling a global function with example usage: update_results(m, f, key, b, s) and returns: B,  S