code: def hits(
      G,
      max_iter=100,
      tol=1.0e-8,
      nstart=None,
      normalized=True,
      *,
      weight="weight",
      dtype=None,
  ):
      G = _to_graph(G, weight, np.float32)
      if (N := len(G)) == 0:
          return {}, {}
      if dtype is not None:
          dtype = _get_float_dtype(dtype)
      elif weight in G.edge_values:
          dtype = _get_float_dtype(G.edge_values[weight].dtype)
      else:
          dtype = np.float32
      if nstart is not None:
          nstart = G._dict_to_nodearray(nstart, 0, dtype)
      if max_iter <= 0:
          if nx.__version__[:3] <= "3.2":
              raise ValueError("`maxiter` must be a positive integer.")
          raise nx.PowerIterationFailedConvergence(max_iter)
      try:
          node_ids, hubs, authorities = plc.hits(
              resource_handle=plc.ResourceHandle(),
              graph=G._get_plc_graph(
                  weight, 1, dtype, store_transposed=True
              ),
              tol=tol,
              initial_hubs_guess_vertices=None
              if nstart is None
              else cp.arange(N, dtype=index_dtype),
              initial_hubs_guess_values=nstart,
              max_iter=max_iter,
              normalized=normalized,
              do_expensive_check=False,
          )
      except RuntimeError as exc:
          # Errors from PLC are sometimes a little scary and not very helpful
          raise nx.PowerIterationFailedConvergence(max_iter) from exc
      return (
          G._nodearrays_to_dict(node_ids, hubs),
          G._nodearrays_to_dict(node_ids, authorities),
      )
  
imports: import cupy
  import networkx
  import numpy
  import pylibcugraph
  from nx_cugraph.convert import _to_graph
  from nx_cugraph.utils import _dtype_param, _get_float_dtype, index_dtype, networkx_algorithm
label_desc: Use image node_id 1 for calling a global function with example usage: hits(G, max_iter, tol, nstart, normalized) and returns: G,  G, dict,  dict