class_docstr: MovieLens rating dataset.
docstr: Returns DatasetInfo according to self.builder_config.
docstr_tok: ["Returns","DatasetInfo","according","to","self.builder_config","."]
code: def _info(self) -> tfds.core.DatasetInfo:
      """Returns DatasetInfo according to self.builder_config."""
      movie_features_dict = {
          "movie_id": np.str_,
          "movie_title": np.str_,
          "movie_genres": tfds.features.Sequence(
              tfds.features.ClassLabel(
                  names=[
                      "Action",
                      "Adventure",
                      "Animation",
                      "Children",
                      "Comedy",
                      "Crime",
                      "Documentary",
                      "Drama",
                      "Fantasy",
                      "Film-Noir",
                      "Horror",
                      "IMAX",
                      "Musical",
                      "Mystery",
                      "Romance",
                      "Sci-Fi",
                      "Thriller",
                      "Unknown",
                      "War",
                      "Western",
                      "(no genres listed)",
                  ]
              ),
          ),
      }
      rating_features_dict = {
          "user_id": np.str_,
          "user_rating": np.float32,
          # Using int64 since tfds currently does not support float64.
          "timestamp": np.int64,
      }
      demographic_features_dict = {
          "user_gender": np.bool_,
          "bucketized_user_age": np.float32,
          "user_occupation_label": tfds.features.ClassLabel(
              names=[
                  "academic/educator",
                  "artist",
                  "clerical/admin",
                  "customer service",
                  "doctor/health care",
                  "entertainment",
                  "executive/managerial",
                  "farmer",
                  "homemaker",
                  "lawyer",
                  "librarian",
                  "other/not specified",
                  "programmer",
                  "retired",
                  "sales/marketing",
                  "scientist",
                  "self-employed",
                  "student",
                  "technician/engineer",
                  "tradesman/craftsman",
                  "unemployed",
                  "writer",
              ]
          ),
          "user_occupation_text": np.str_,
          "user_zip_code": np.str_,
      }
  
      features_dict = {}
      if self.builder_config.table_option == "movies":
          features_dict.update(movie_features_dict)
      # For the other cases, self.builder_config.table_option == 'ratings'.
      # Older versions of MovieLens (1m, 100k) have demographic features.
      elif self.builder_config.format_version == "1m":
          features_dict.update(movie_features_dict)
          features_dict.update(rating_features_dict)
          features_dict.update(demographic_features_dict)
      elif self.builder_config.format_version == "100k":
          # Only the 100k dataset contains exact user ages. The 1m dataset
          # contains only bucketized age values.
          features_dict.update(movie_features_dict)
          features_dict.update(rating_features_dict)
          features_dict.update(demographic_features_dict)
          features_dict.update(raw_user_age=np.float32)
      else:
          features_dict.update(movie_features_dict)
          features_dict.update(rating_features_dict)
      return tfds.core.DatasetInfo(
          builder=self,
          description=_DESCRIPTION,
          features=tfds.features.FeaturesDict(features_dict),
          supervised_keys=None,
          homepage="https://grouplens.org/datasets/movielens/",
          citation=_CITATION,
      )
  
imports: from __future__ import annotations
  import os
  import textwrap
  from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple
  from absl import logging
  import numpy
  import tensorflow_datasets.public_api
  from tensorflow_datasets.structured import movielens_parsing
label_desc: Use image node_id 1 for calling the Movielens obj's underlying member method code with example usage: obj._info() and returns: tfds