code: def test_etype_tuple_to_str():
      """Convert etype from tuple to string."""
      # Test for expected input.
      c_etype = ("user", "like", "item")
      c_etype_str = gb.etype_tuple_to_str(c_etype)
      assert c_etype_str == "user:like:item"
  
      # Test for unexpected input: not a tuple.
      c_etype = "user:like:item"
      with pytest.raises(
          AssertionError,
          match=re.escape(
              "Passed-in canonical etype should be in format of (str, str, str). "
              "But got user:like:item."
          ),
      ):
          _ = gb.etype_tuple_to_str(c_etype)
  
      # Test for unexpected input: tuple with wrong length.
      c_etype = ("user", "like")
      with pytest.raises(
          AssertionError,
          match=re.escape(
              "Passed-in canonical etype should be in format of (str, str, str). "
              "But got ('user', 'like')."
          ),
      ):
          _ = gb.etype_tuple_to_str(c_etype)
  
file_path: dgl/tests/python/pytorch/graphbolt/test_base.py
imports: import re
  import unittest
  from collections.abc import Iterable, Mapping
  import backend
  import dgl.graphbolt
  import pytest
  import torch
  from .None import gb_test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_etype_tuple_to_str() without return types