code: def _create_entity_nodes(
      events,
      columns,
      dropna=True,
      categorical_metadata=False,
      categories=dict(),
      DELIM="::",
      NODEID="node_id",
      CATEGORY="category",
      NODETYPE="node_type",
  ):
      nodes = [
          cudf.DataFrame(
              dict(
                  [
                      (NODEID, cudf.core.column.column_empty(0, "str")),
                      (
                          CATEGORY,
                          cudf.core.column.column_empty(
                              0,
                              "str"
                              if not categorical_metadata
                              else _empty_cat_dt(),
                          ),
                      ),
                      (
                          NODETYPE,
                          cudf.core.column.column_empty(
                              0,
                              "str"
                              if not categorical_metadata
                              else _empty_cat_dt(),
                          ),
                      ),
                  ]
                  + [
                      (key, cudf.core.column.column_empty(0, col.dtype))
                      for key, col in events[columns].items()
                  ]
              )
          )
      ]
  
      for key, col in events[columns].items():
          cat = categories.get(key, key)
          col = col.unique().sort_values()
          col = col.nans_to_nulls().dropna() if dropna else col
          if len(col) == 0:
              continue
          df = cudf.DataFrame(
              {
                  key: cudf.core.column.as_column(col),
                  NODEID: _prepend_str(col, cat + DELIM),
                  CATEGORY: cat
                  if not categorical_metadata
                  else _str_scalar_to_category(len(col), cat),
                  NODETYPE: key
                  if not categorical_metadata
                  else _str_scalar_to_category(len(col), key),
              }
          )
          df.reset_index(drop=True, inplace=True)
          nodes.append(df)
  
      nodes = cudf.concat(nodes)
      nodes = nodes.drop_duplicates(subset=[NODEID])
      nodes = nodes[[NODEID, NODETYPE, CATEGORY] + list(columns)]
      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 2 for calling a global function with example usage: _create_entity_nodes(events, columns, dropna, categorical_metadata, categories, DELIM, NODEID, CATEGORY, NODETYPE) and returns: nodes