code: def _assert_valid_canonical_etype(canonical_etype):
      if not _is_valid_canonical_etype:
          error_message = (
              f"Invalid canonical_etype {canonical_etype} "
              + "canonical etype should be is a string triplet (str, str, str)"
              + "for source node type, edge type and destination node type"
          )
          raise dgl.DGLError(error_message)
  
imports: import numpy
  from cugraph.gnn.dgl_extensions.utils.sampling import eid_n, src_n, dst_n
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_valid_canonical_etype(canonical_etype) without return types