code: def _create_hyper_edges(
      events,
      columns,
      dropna=True,
      categories=dict(),
      drop_edge_attrs=False,
      categorical_metadata=False,
      DELIM="::",
      EVENTID="event_id",
      ATTRIBID="attrib_id",
      CATEGORY="category",
      EDGETYPE="edge_type",
      NODETYPE="node_type",
  ):
      edge_attrs = [x for x in events.columns if x != NODETYPE]
      edges = [
          cudf.DataFrame(
              dict(
                  (
                      [
                          (
                              EVENTID,
                              cudf.core.column.column_empty(0, "str"),
                          ),
                          (
                              ATTRIBID,
                              cudf.core.column.column_empty(0, "str"),
                          ),
                          (
                              EDGETYPE,
                              cudf.core.column.column_empty(
                                  0,
                                  "str"
                                  if not categorical_metadata
                                  else _empty_cat_dt(),
                              ),
                          ),
                      ]
                  )
                  + (
                      []
                      if len(categories) == 0
                      else [
                          (
                              CATEGORY,
                              cudf.core.column.column_empty(
                                  0,
                                  "str"
                                  if not categorical_metadata
                                  else _empty_cat_dt(),
                              ),
                          )
                      ]
                  )
                  + (
                      []
                      if drop_edge_attrs
                      else [
                          (
                              key,
                              cudf.core.column.column_empty(
                                  0, col.dtype
                              ),
                          )
                          for key, col in events[edge_attrs].items()
                      ]
                  )
              )
          )
      ]
  
      for key, col in events[columns].items():
          cat = categories.get(key, key)
          fs = [EVENTID] + ([key] if drop_edge_attrs else edge_attrs)
          df = events[fs].dropna(subset=[key]) if dropna else events[fs]
          if len(df) == 0:
              continue
          if len(categories) > 0:
              df[CATEGORY] = (
                  key
                  if not categorical_metadata
                  else _str_scalar_to_category(len(df), key)
              )
          df[EDGETYPE] = (
              cat
              if not categorical_metadata
              else _str_scalar_to_category(len(df), cat)
          )
          df[ATTRIBID] = _prepend_str(col, cat + DELIM)
          df.reset_index(drop=True, inplace=True)
          edges.append(df)
  
      columns = [EVENTID, EDGETYPE, ATTRIBID]
  
      if len(categories) > 0:
          columns += [CATEGORY]
  
      if not drop_edge_attrs:
          columns += edge_attrs
  
      edges = cudf.concat(edges)[columns]
      edges.reset_index(drop=True, inplace=True)
      return edges
  
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 4 for calling a global function with example usage: _create_hyper_edges(events, columns, dropna, categories, drop_edge_attrs, categorical_metadata, DELIM, EVENTID, ATTRIBID, CATEGORY, EDGETYPE, NODETYPE) and returns: edges