code: def test_etype_str_to_tuple():
      """Convert etype from string to tuple."""
      # Test for expected input.
      c_etype_str = "user:like:item"
      c_etype = gb.etype_str_to_tuple(c_etype_str)
      assert c_etype == ("user", "like", "item")
  
      # Test for unexpected input: string with wrong format.
      c_etype_str = "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_str_to_tuple(c_etype_str)
  
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 4 for calling a global function with example usage: test_etype_str_to_tuple() without return types