code: def create_cudf_from_dict(dict_in):
      """
      converts python dictionary to a cudf.Dataframe as needed by this
      cugraph pagerank call.
  
      Parameters
      ----------
      dictionary with node ids(key) and values
  
      Returns
      -------
      a cudf DataFrame of (vertex)ids and values.
      """
      if not (isinstance(dict_in, dict)):
          raise TypeError(
              "type_name must be a dict, got: " f"{type(dict_in)}"
          )
      # FIXME: Looking to replacing fromiter with rename and
      # compare performance
      k = np.fromiter(dict_in.keys(), dtype="int32")
      v = np.fromiter(dict_in.values(), dtype="float32")
      df = cudf.DataFrame({"vertex": k, "values": v})
      return df
  
imports: import cugraph
  import cugraph.utilities
  import cudf
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: create_cudf_from_dict(dict_in) and returns: df