class_docstr: View of statistics for a dataset (slice).
class_docstr_tok: ["View","of","statistics","for","a","dataset","(","slice",")","."]
docstr: Retrieve a feature if it exists.
  
  Features specified within the underlying proto by name (instead of path) are
  normalized to a length 1 path, and can be referred to as such.
  
  Args:
    feature_id: A types.FeaturePath, Iterable[str] consisting of path steps,
      or a str, which is converted to a length one path.
  
  Returns:
    A FeatureView, or None if feature_id is not present.
docstr_tok: ["Retrieve","a","feature","if","it","exists",".","Features","specified","within","the","underlying","proto","by","name","(","instead","of","path",")","are","normalized","to","a","length","1","path",",","and","can","be","referred","to","as","such",".","Args",":","feature_id",":","A","types.FeaturePath",",","Iterable","[","str","]","consisting","of","path","steps",",","or","a","str",",","which","is","converted","to","a","length","one","path",".","Returns",":","A","FeatureView",",","or","None","if","feature_id","is","not","present","."]
code: def get_feature(
      self, feature_id: Union[str, types.FeaturePath, Iterable[str]]
  ) -> Optional["FeatureView"]:
      """Retrieve a feature if it exists.
  
      Features specified within the underlying proto by name (instead of path) are
      normalized to a length 1 path, and can be referred to as such.
  
      Args:
        feature_id: A types.FeaturePath, Iterable[str] consisting of path steps,
          or a str, which is converted to a length one path.
  
      Returns:
        A FeatureView, or None if feature_id is not present.
      """
      feature_id = _normalize_feature_id(feature_id)
      self._init_index()
      index = self._feature_map.get(feature_id, None)
      if index is None:
          return None
      return FeatureView(self._statistics.features[index])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from typing import Dict, Iterable, Optional, Sequence, Text, Tuple, Union
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.utils import io_util
  from tfx_bsl import statistics
  from tfx_bsl.arrow import array_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 4 for calling the DatasetView obj's underlying member method code with example usage: obj.get_feature(feature_id) and returns: FeatureView, None