code: def _create_hyper_nodes(
      events,
      categorical_metadata=False,
      NODEID="node_id",
      EVENTID="event_id",
      CATEGORY="category",
      NODETYPE="node_type",
  ):
      nodes = events.copy(deep=False)
      if NODEID in nodes:
          nodes.drop(columns=[NODEID], inplace=True)
      if NODETYPE in nodes:
          nodes.drop(columns=[NODETYPE], inplace=True)
      if CATEGORY in nodes:
          nodes.drop(columns=[CATEGORY], inplace=True)
      nodes[NODETYPE] = (
          EVENTID
          if not categorical_metadata
          else _str_scalar_to_category(len(nodes), EVENTID)
      )
      nodes[CATEGORY] = (
          "event"
          if not categorical_metadata
          else _str_scalar_to_category(len(nodes), "event")
      )
      nodes[NODEID] = nodes[EVENTID]
      nodes.reset_index(drop=True, inplace=True)
      return nodes
  
file_path: cugraph/python/cugraph/cugraph/structure/hypergraph.py
imports: import cudf
  import numpy
  from cugraph.structure.graph_classes import Graph
label_desc: Use image node_id 3 for calling a global function with example usage: _create_hyper_nodes(events, categorical_metadata, NODEID, EVENTID, CATEGORY, NODETYPE) and returns: nodes