class_docstr: Visitor optimizes the operation graph (see nodes.py).
  
  This operates on the translated graph which is emitted by the
  `_TranslateVisitor`, and performs optimizations.
  
  Namely, when enabled, this enables reading and writing from/to analyzer
  accumulator cache to avoid recomputing them over already seen datasets.
  This type of optimization requires also creating a partitioned view of the
  input data, according to the `is_partitionable` annotation.
code: def _visit_partitionable_operation(
      self, operation_def, upstream_views
  ):
      # This is a hint for whether or not the `fine_grained_view` should be used
      # downstream.  It should be set to true if either the upstream view has
      # cacheing operations that haven't been flattened yet, or the current
      # operation is cacheable.
      all_fine_grained_views_available = all(
          v.fine_grained_view for v in upstream_views
      )
      prefer_fine_grained_view = (
          any(v.prefer_fine_grained_view for v in upstream_views)
          or all_fine_grained_views_available
          and operation_def.cache_coder is not None
      )
  
      next_hashed_path = self._make_next_hashed_path(
          [v.hashed_path for v in upstream_views], operation_def
      )
      if all_fine_grained_views_available:
          fine_grained_views = (
              self._apply_operation_on_fine_grained_view(
                  operation_def,
                  tuple(v.fine_grained_view for v in upstream_views),
                  next_hashed_path,
              ),
          )
      else:
          fine_grained_views = (None,) * operation_def.num_outputs
  
      flattened_views = nodes.OperationNode(
          operation_def, tuple(v.flattened_view for v in upstream_views)
      ).outputs
  
      assert len(fine_grained_views) == len(flattened_views)
      return tuple(
          _OptimizationView(  # pylint: disable=g-complex-comprehension
              prefer_fine_grained_view=prefer_fine_grained_view,
              flattened_view=flat,
              fine_grained_view=fine,
              hashed_path=next_hashed_path,
          )
          for flat, fine in zip(flattened_views, fine_grained_views)
      )
  
imports: import collections
  import dataclasses
  import hashlib
  from typing import Collection, Dict, Mapping, Optional, Tuple
  from typing import OrderedDict
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform import impl_helper
  from tensorflow_transform import nodes
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.beam import analyzer_cache
  from tensorflow_transform.beam import beam_nodes
  from tensorflow_transform.beam import combiner_packing_util
label_desc: Use image node_id 6 for calling the _OptimizeVisitor obj's underlying member method code with example usage: obj._visit_partitionable_operation(operation_def, upstream_views) and returns: tuple