code: def is_valid_dataset_name(name_str: str) -> bool:
      """Returns True is the given name is a valid dataset name."""
      res = _NAME_REG.match(name_str)
      return bool(res)
  
imports: from __future__ import annotations
  import dataclasses
  import functools
  import os
  import re
  import textwrap
  from typing import Any, Dict, List, Mapping, MutableMapping, Optional, Tuple, Union
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import version
label_desc: Use image node_id 1 for calling a global function with example usage: is_valid_dataset_name(name_str) and returns: bool