class_docstr: DatasetBuilder for LAION-400M dataset.
class_docstr_tok: ["DatasetBuilder","for","LAION-400M","dataset","."]
docstr: Returns the dataset metadata.
docstr_tok: ["Returns","the","dataset","metadata","."]
code: def _info(self) -> tfds.core.DatasetInfo:
      """Returns the dataset metadata."""
      features = {
          "caption": tfds.features.Text(doc="HTML alt-text attribute"),
          "nsfw": tfds.features.ClassLabel(
              names=_NSFW_TAGS,
              doc=(
                  "NSFW tag (detected with CLIP). Incohesive and missing tags"
                  f" are replaced with {_NSFW_MISSING_TAG}"
              ),
          ),
          "similarity": tfds.features.Scalar(
              tf.float64,
              doc=tfds.features.Documentation(
                  desc=(
                      "cosine similarity score between the text and image "
                      "embedding. Missing values default to "
                      f"{_MISSING_SIMILARITY_VALUE}"
                  ),
                  value_range="[0.0, 1.0]",
              ),
          ),
          "license": tfds.features.Text(
              doc="type of Creative Commons license (if applicable)"
          ),
          "url": tfds.features.Text(doc="image URL"),
          "original_width": tfds.features.Scalar(
              tf.int32, doc="original width of the image"
          ),
          "original_height": tfds.features.Scalar(
              tf.int32, doc="original height of the image"
          ),
      }
  
      if self.builder_config.name == LAION400M_IMAGES_CONFIG.name:
          features.update(
              {
                  "image": tfds.features.Image(doc="image"),
              }
          )
      else:
          features.update(
              {
                  "image_embedding": tfds.features.Tensor(
                      shape=_CLIP_EMBEDDING_SHAPE,
                      dtype=tf.float16,
                      doc="CLIP image embedding",
                  ),
                  "text_embedding": tfds.features.Tensor(
                      shape=_CLIP_EMBEDDING_SHAPE,
                      dtype=tf.float16,
                      doc="CLIP text embedding",
                  ),
              }
          )
  
      return tfds.core.DatasetInfo(
          builder=self,
          description=_DESCRIPTION,
          features=tfds.features.FeaturesDict(features),
          supervised_keys=None,
          homepage=_HOMEPAGE,
          citation=_CITATION,
      )
  
file_path: datasets/tensorflow_datasets/vision_language/laion400m/laion400m.py
imports: import functools
  from typing import Dict, Tuple
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 for calling the Laion400m obj's underlying member method code with example usage: obj._info() and returns: tfds