class_docstr: Represents options for dataset optimizations.
  
  You can set the optimization options of a dataset through the
  `experimental_optimization` property of `tf.data.Options`; the property is
  an instance of `tf.data.experimental.OptimizationOptions`.
  
  ```python
  options = tf.data.Options()
  options.experimental_optimization.noop_elimination = True
  options.experimental_optimization.apply_default_optimizations = False
  dataset = dataset.with_options(options)
  ```
class_docstr_tok: ["Represents","options","for","dataset","optimizations",".","You","can","set","the","optimization","options","of","a","dataset","through","the","`","experimental_optimization","`","property","of","`","tf.data.Options","`",";","the","property","is","an","instance","of","`","tf.data.experimental.OptimizationOptions","`",".","``","`","python","options","=","tf.data.Options","(",")","options.experimental_optimization.noop_elimination","=","True","options.experimental_optimization.apply_default_optimizations","=","False","dataset","=","dataset.with_options","(","options",")","``","`"]
code: def _from_proto(self, pb):
      if (
          pb.WhichOneof("optional_apply_default_optimizations")
          is not None
      ):
          self.apply_default_optimizations = (
              pb.apply_default_optimizations
          )
      if pb.WhichOneof("optional_filter_fusion") is not None:
          self.filter_fusion = pb.filter_fusion
      if pb.WhichOneof("optional_filter_parallelization") is not None:
          self.filter_parallelization = pb.filter_parallelization
      if pb.WhichOneof("optional_inject_prefetch") is not None:
          self.inject_prefetch = pb.inject_prefetch
      if pb.WhichOneof("optional_map_and_batch_fusion") is not None:
          self.map_and_batch_fusion = pb.map_and_batch_fusion
      if pb.WhichOneof("optional_map_and_filter_fusion") is not None:
          self.map_and_filter_fusion = pb.map_and_filter_fusion
      if pb.WhichOneof("optional_map_fusion") is not None:
          self.map_fusion = pb.map_fusion
      if pb.WhichOneof("optional_map_parallelization") is not None:
          self.map_parallelization = pb.map_parallelization
      if pb.WhichOneof("optional_noop_elimination") is not None:
          self.noop_elimination = pb.noop_elimination
      if pb.WhichOneof("optional_parallel_batch") is not None:
          self.parallel_batch = pb.parallel_batch
      if (
          pb.WhichOneof("optional_shuffle_and_repeat_fusion")
          is not None
      ):
          self.shuffle_and_repeat_fusion = pb.shuffle_and_repeat_fusion
  
imports: import enum
  import platform
  from absl import logging
  from tensorflow.core.framework import dataset_options_pb2
  from tensorflow.core.framework import model_pb2
  from tensorflow.python.data.ops import test_mode
  from tensorflow.python.data.util import options
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling the OptimizationOptions obj's underlying member method code with example usage: obj._from_proto(pb) without return types