code: def _to_tfds_split(split: Split) -> tfds.Split:
      """Returns the TFDS split appropriately sharded."""
      # NOTE: Imagenet did not release labels for the test split used in the
      # competition, so it has been typical at DeepMind to consider the VALID
      # split the TEST split and to reserve 10k images from TRAIN for VALID.
      if split in (Split.TRAIN, Split.TRAIN_AND_VALID, Split.VALID):
          return tfds.Split.TRAIN
      else:
          assert split == Split.TEST
          return tfds.Split.VALIDATION
  
imports: from collections.abc import Iterable, Iterator, Mapping, Sequence
  import enum
  import itertools
  import types
  from typing import Optional
  import jax
  import jax.numpy
  import numpy
  from packaging import version
  import tensorflow.compat.v2
  import tensorflow_datasets
label_desc: Use image node_id 6 for calling a global function with example usage: _to_tfds_split(split) and returns: tfds, tfds