code: def in_degree_centrality(G):
      G = _to_directed_graph(G)
      if len(G) <= 1:
          return dict.fromkeys(G, 1)
      deg = G._in_degrees_array()
      centrality = deg * (1 / (len(G) - 1))
      return G._nodearray_to_dict(centrality)
  
imports: from nx_cugraph.convert import _to_directed_graph, _to_graph
  from nx_cugraph.utils import networkx_algorithm, not_implemented_for
label_desc: Use image node_id 2 for calling a global function with example usage: in_degree_centrality(G) and returns: G, dict