class_docstr: Defines interface any TFDS logger must implement.
  
  Registered loggers methods are called on TFDS events, synchronously, from the
  same thread the call was made, in sequence, and in registration order.
  Exceptions are *NOT* caught.
class_docstr_tok: ["Defines","interface","any","TFDS","logger","must","implement",".","Registered","loggers","methods","are","called","on","TFDS","events",",","synchronously",",","from","the","same","thread","the","call","was","made",",","in","sequence",",","and","in","registration","order",".","Exceptions","are","*","NOT","*","caught","."]
docstr: Callback called when user calls `dataset_builder.as_dataset`.
  
  Callback is also triggered by `tfds.load`, which calls `as_dataset`.
  The logger MUST NOT mutate passed objects (decoders, read_config, ...).
  
  Args:
    metadata: CallMetadata associated to call.
    name: the name of the dataset. E.g.: "mnist".
    config_name: the name of the config or None.
    version: the dataset version. E.g.: "1.2.3".
    data_path: The path to directory of the dataset loaded. E.g.:
      "/home/alice/.tensorflow_datasets/mnist/1.2.3".
    split: name of the split requested by user. 'all' for all splits.
    batch_size: See DatasetBuilder.as_dataset docstring.
    shuffle_files: -
    read_config: -
    as_supervised: -
    decoders: flatten dict of decoders dict given to `as_dataset`, with the
      values being `{module_name}.{class_name}` instad of a
docstr_tok: ["Callback","called","when","user","calls","`","dataset_builder.as_dataset","`",".","Callback","is","also","triggered","by","`","tfds.load","`",",","which","calls","`","as_dataset","`",".","The","logger","MUST","NOT","mutate","passed","objects","(","decoders",",","read_config",",","...",")",".","Args",":","metadata",":","CallMetadata","associated","to","call",".","name",":","the","name","of","the","dataset",".","E.g",".",":","``","mnist","''",".","config_name",":","the","name","of","the","config","or","None",".","version",":","the","dataset","version",".","E.g",".",":","``","1.2.3","''",".","data_path",":","The","path","to","directory","of","the","dataset","loaded",".","E.g",".",":","``","\/home\/alice\/.tensorflow_datasets\/mnist\/1.2.3","''",".","split",":","name","of","the","split","requested","by","user",".","'all","'","for","all","splits",".","batch_size",":","See","DatasetBuilder.as_dataset","docstring",".","shuffle_files",":","-","read_config",":","-","as_supervised",":","-","decoders",":","flatten","dict","of","decoders","dict","given","to","`","as_dataset","`",",","with","the","values","being","`","{","module_name","}",".","{","class_name","}","`","instad","of","a"]
code: def as_dataset(
      self,
      *,
      metadata: call_metadata.CallMetadata,
      name: str,
      config_name: Optional[str],
      version: str,
      data_path: str,
      split: Optional[type_utils.Tree[splits_lib.SplitArg]],
      batch_size: Optional[int],
      shuffle_files: bool,
      read_config: read_config_lib.ReadConfig,
      as_supervised: bool,
      decoders: Optional[TreeDict[decode.partial_decode.DecoderArg]],
  ):
      """Callback called when user calls `dataset_builder.as_dataset`.
  
      Callback is also triggered by `tfds.load`, which calls `as_dataset`.
      The logger MUST NOT mutate passed objects (decoders, read_config, ...).
  
      Args:
        metadata: CallMetadata associated to call.
        name: the name of the dataset. E.g.: "mnist".
        config_name: the name of the config or None.
        version: the dataset version. E.g.: "1.2.3".
        data_path: The path to directory of the dataset loaded. E.g.:
          "/home/alice/.tensorflow_datasets/mnist/1.2.3".
        split: name of the split requested by user. 'all' for all splits.
        batch_size: See DatasetBuilder.as_dataset docstring.
        shuffle_files: -
        read_config: -
        as_supervised: -
        decoders: flatten dict of decoders dict given to `as_dataset`, with the
          values being `{module_name}.{class_name}` instad of a
      """
      pass
  
imports: from typing import Any, Dict, Optional, Union
  from tensorflow_datasets.core import decode
  from tensorflow_datasets.core import download
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.logging import call_metadata
  from tensorflow_datasets.core.utils import read_config
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 4 for calling the Logger obj's underlying member method code with example usage: obj.as_dataset() without return types