code: def number_of_selfloops(G):
      G = _to_graph(G)
      is_selfloop = G.src_indices == G.dst_indices
      return is_selfloop.sum().tolist()
  
label_desc: Use image node_id 1 for calling a global function with example usage: number_of_selfloops(G) and returns: is_selfloop