code: def _validate_text_and_label(
      text: tf.Tensor, label: tf.Tensor
  ) -> None:
      """Validates the shape and type of `text` and `label`.
  
      Args:
        text: Stores text data. Should have shape [1] and dtype tf.string.
        label: Stores the label for the corresponding `text`. Should have shape [1]
          and dtype tf.int64.
  
      Raises:
        ValueError: If either tensor has the wrong shape or type.
      """
      if text.shape != [1]:
          raise ValueError(
              f"`text` should have shape [1], got {text.shape}"
          )
      if text.dtype != tf.string:
          raise ValueError(
              f"Expected dtype string for `text`, got {text.dtype}"
          )
      if label.shape != [1]:
          raise ValueError(
              f"`label` should have shape [1], got {text.shape}"
          )
      if label.dtype != tf.int64:
          raise ValueError(
              f"Expected dtype int64 for `label`, got {label.dtype}"
          )
  
imports: import collections
  import hashlib
  import os
  import re
  from typing import Mapping, Sequence, Tuple, Union
  import tensorflow
  import tensorflow_hub
  from mediapipe.model_maker.python.core.data import cache_files
  from mediapipe.model_maker.python.text.text_classifier import bert_tokenizer
  from mediapipe.model_maker.python.text.text_classifier import dataset
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_text_and_label(text, label) without return types