code: def test_hyperedges(categorical_metadata):
      h = cugraph.hypergraph(
          simple_df, categorical_metadata=categorical_metadata
      )
  
      assert len(h.keys()) == len(
          ["entities", "nodes", "edges", "events", "graph"]
      )
  
      edges = cudf.from_pandas(
          pd.DataFrame(
              {
                  "event_id": [
                      "event_id::0",
                      "event_id::1",
                      "event_id::2",
                      "event_id::0",
                      "event_id::1",
                      "event_id::2",
                      "event_id::0",
                      "event_id::1",
                      "event_id::2",
                      "event_id::0",
                      "event_id::1",
                      "event_id::2",
                  ],
                  "edge_type": [
                      "a1",
                      "a1",
                      "a1",
                      "a2",
                      "a2",
                      "a2",
                      "id",
                      "id",
                      "id",
                      "🙈",
                      "🙈",
                      "🙈",
                  ],
                  "attrib_id": [
                      "a1::1",
                      "a1::2",
                      "a1::3",
                      "a2::red",
                      "a2::blue",
                      "a2::green",
                      "id::a",
                      "id::b",
                      "id::c",
                      "🙈::æski ēˈmōjē",
                      "🙈::😋",
                      "🙈::s",
                  ],
                  "id": ["a", "b", "c"] * 4,
                  "a1": [1, 2, 3] * 4,
                  "a2": ["red", "blue", "green"] * 4,
                  "🙈": ["æski ēˈmōjē", "😋", "s"] * 4,
              }
          )
      )
  
      if categorical_metadata:
          edges = edges.astype({"edge_type": "category"})
  
      assert_frame_equal(edges, h["edges"], check_dtype=False)
      for k, v in [
          ("entities", 12),
          ("nodes", 15),
          ("edges", 12),
          ("events", 3),
      ]:
          assert len(h[k]) == v
  
imports: import datetime
  import pandas
  import pytest
  import cudf
  from cudf.testing.testing import assert_frame_equal
  import cugraph
label_desc: Use image node_id 2 for calling a global function with example usage: test_hyperedges(categorical_metadata) without return types