# Path: tensorflow_transform/beam/deep_copy.py
# def deep_copy(pcollection):
#   """Create a deep copy of a PCollection up to materialization boundaries."""
#   if not isinstance(pcollection, pvalue.PCollection):
#     raise ValueError('Input to deep_copy must be a PCollection.')
# 
#   # AppliedPTransform.update_input_refcounts() is a vestigial method that
#   # uses an incorrect heuristic; it will be removed in a future version of
#   # Beam, since its results aren't used anyway.  Until then, we work around
#   # this (see https://issues.apache.org/jira/browse/BEAM-4593).
#   if getattr(beam_pipeline.AppliedPTransform,
#              'update_input_refcounts', None) is not None:
#     beam_pipeline.AppliedPTransform.update_input_refcounts = lambda _: None
# 
#   to_clone = _get_items_to_clone(pcollection)
#   pcollection_replacements = _clone_items(pcollection.pipeline, to_clone)
# 
#   return pcollection_replacements[pcollection]
# 
# Path: tensorflow_transform/beam/test_helpers.py
# def make_test_beam_pipeline_kwargs():


import collections
import apache_beam as beam
import unittest
from apache_beam import pvalue
from apache_beam.transforms import resources
from tensorflow_transform.beam import deep_copy
from tensorflow_transform.beam import test_helpers
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Unit tests for tensorflow_transform.beam.deep_copy."""




# pylint: disable=g-long-lambda
class DeepCopyTest(unittest.TestCase):

  @staticmethod
  def _MakeBeamPipeline():

# Path: tensorflow_transform/beam/deep_copy.py
# def deep_copy(pcollection):
#   """Create a deep copy of a PCollection up to materialization boundaries."""
#   if not isinstance(pcollection, pvalue.PCollection):
#     raise ValueError('Input to deep_copy must be a PCollection.')
# 
#   # AppliedPTransform.update_input_refcounts() is a vestigial method that
#   # uses an incorrect heuristic; it will be removed in a future version of
#   # Beam, since its results aren't used anyway.  Until then, we work around
#   # this (see https://issues.apache.org/jira/browse/BEAM-4593).
#   if getattr(beam_pipeline.AppliedPTransform,
#              'update_input_refcounts', None) is not None:
#     beam_pipeline.AppliedPTransform.update_input_refcounts = lambda _: None
# 
#   to_clone = _get_items_to_clone(pcollection)
#   pcollection_replacements = _clone_items(pcollection.pipeline, to_clone)
# 
#   return pcollection_replacements[pcollection]
# 
# Path: tensorflow_transform/beam/test_helpers.py
# def make_test_beam_pipeline_kwargs():


# Path: tensorflow_transform/beam/deep_copy_test.py
import collections
import apache_beam as beam
import unittest
from apache_beam import pvalue
from apache_beam.transforms import resources
from tensorflow_transform.beam import deep_copy
from tensorflow_transform.beam import test_helpers

# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Unit tests for tensorflow_transform.beam.deep_copy."""




# pylint: disable=g-long-lambda
class DeepCopyTest(unittest.TestCase):

  @staticmethod
  def _MakeBeamPipeline():

    return beam.Pipeline(**test_helpers.make_test_beam_pipeline_kwargs())