code: def degree_centrality(G, normalized=True):
      """
      Computes the degree centrality of each vertex of the input graph.
  
      Parameters
      ----------
      G : cuGraph.Graph or networkx.Graph
          cuGraph graph descriptor with connectivity information. The graph can
          contain either directed or undirected edges.
  
      normalized : bool, optional, default=True
          If True normalize the resulting degree centrality values
  
      Returns
      -------
      df : cudf.DataFrame or Dictionary if using NetworkX
          GPU data frame containing two cudf.Series of size V: the vertex
          identifiers and the corresponding degree centrality values.
  
          df['vertex'] : cudf.Series
              Contains the vertex identifiers
  
          df['degree_centrality'] : cudf.Series
              Contains the degree centrality of vertices
  
      Examples
      --------
      >>> from cugraph.datasets import karate
      >>> G = karate.get_graph(download=True)
      >>> dc = cugraph.degree_centrality(G)
  
      """
      G, isNx = ensure_cugraph_obj_for_nx(G)
  
      df = G.degree()
      df.rename(columns={"degree": "degree_centrality"}, inplace=True)
  
      if normalized:
          df["degree_centrality"] /= G.number_of_nodes() - 1
  
      if isNx is True:
          dict = df_score_to_dictionary(df, "degree_centrality")
          return dict
      else:
          return df
  
label_desc: Use image node_id 1 for calling a global function with example usage: degree_centrality(G, normalized) and returns: dict, df