code: def obtain_capture_by_value_ops(dataset):
      """Given an input dataset, finds all allowlisted ops used for construction.
  
      Allowlisted ops are stateful ops which are known to be safe to capture by
      value.
  
      Args:
        dataset: Dataset to find allowlisted stateful ops for.
  
      Returns:
        A list of variant_tensor producing dataset ops used to construct this
        dataset.
      """
  
      def capture_by_value(op):
          return (
              op.outputs[0].dtype in TENSOR_TYPES_ALLOWLIST
              or op.type in OP_TYPES_ALLOWLIST
          )
  
      return _traverse(dataset, capture_by_value)
  
imports: import queue
  from tensorflow.python.framework import dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: obtain_capture_by_value_ops(dataset) and returns: _traverse, unknown