code: def default_test_combinations():
      """Returns the default test combinations for testing checkpointing."""
  
      def disable_optimizations(ds_fn):
          options = options_lib.Options()
          options.experimental_optimization.apply_default_optimizations = (
              False
          )
  
          def ds_fn_no_opt():
              return ds_fn().with_options(options)
  
          return ds_fn_no_opt
  
      def verify_unused_iterator(
          obj,
          ds_fn,
          num_outputs,
          sparse_tensors=False,
          assert_items_equal=False,
      ):
          obj.verify_unused_iterator(
              ds_fn=disable_optimizations(ds_fn=ds_fn),
              num_outputs=num_outputs,
              sparse_tensors=sparse_tensors,
              assert_items_equal=assert_items_equal,
          )
  
      verify_unused_iterator_combination = combinations.combine(
          verify_fn=combinations.NamedObject(
              "verify_unused_iterator", verify_unused_iterator
          )
      )
  
      def verify_fully_used_iterator(
          obj,
          ds_fn,
          num_outputs,
          sparse_tensors=False,
          assert_items_equal=False,
      ):
          obj.verify_fully_used_iterator(
              ds_fn=disable_optimizations(ds_fn=ds_fn),
              num_outputs=num_outputs,
              sparse_tensors=sparse_tensors,
              assert_items_equal=assert_items_equal,
          )
  
      verify_fully_used_iterator_combination = combinations.combine(
          verify_fn=combinations.NamedObject(
              "verify_fully_used_iterator", verify_fully_used_iterator
          )
      )
  
      def verify_exhausted_iterator(
          obj,
          ds_fn,
          num_outputs,
          sparse_tensors=False,
          assert_items_equal=False,
      ):
          obj.verify_exhausted_iterator(
              ds_fn=disable_optimizations(ds_fn=ds_fn),
              num_outputs=num_outputs,
              sparse_tensors=sparse_tensors,
              assert_items_equal=assert_items_equal,
          )
  
      verify_exhausted_iterator_combination = combinations.combine(
          verify_fn=combinations.NamedObject(
              "verify_exhausted_iterator", verify_exhausted_iterator
          )
      )
  
      def verify_multiple_breaks(
          obj,
          ds_fn,
          num_outputs,
          sparse_tensors=False,
          assert_items_equal=False,
      ):
          obj.verify_multiple_breaks(
              ds_fn=disable_optimizations(ds_fn=ds_fn),
              num_outputs=num_outputs,
              sparse_tensors=sparse_tensors,
              assert_items_equal=assert_items_equal,
          )
  
      verify_multiple_breaks_combination = combinations.combine(
          verify_fn=combinations.NamedObject(
              "verify_multiple_breaks", verify_multiple_breaks
          )
      )
  
      def verify_reset_restored_iterator(
          obj,
          ds_fn,
          num_outputs,
          sparse_tensors=False,
          assert_items_equal=False,
      ):
          obj.verify_reset_restored_iterator(
              ds_fn=disable_optimizations(ds_fn=ds_fn),
              num_outputs=num_outputs,
              sparse_tensors=sparse_tensors,
              assert_items_equal=assert_items_equal,
          )
  
      verify_reset_restored_iterator_combination = combinations.combine(
          verify_fn=combinations.NamedObject(
              "verify_reset_restored_iterator",
              verify_reset_restored_iterator,
          )
      )
  
      return (
          verify_unused_iterator_combination
          + verify_fully_used_iterator_combination
          + verify_exhausted_iterator_combination
          + verify_multiple_breaks_combination
          + verify_reset_restored_iterator_combination
      )
  
imports: import os
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.data.experimental.ops import iterator_ops
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.eager import context
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.training import saver
  from tensorflow.python.util import nest
label_desc: Use image node_id 2 for calling a global function with example usage: default_test_combinations() and returns: unknown, ds_fn_no_opt, ds_fn