def get_ptransform(self, tag):
    """Retrieves ptransform for `tag`.

    Args:
      tag: A string key (or None) to retrieve corresponding ptransform.

    Returns:
      A tuple of a registered beam.PTransform implementation and the tag it was
      registered with.

    Raises:
      KeyError: If no registered PTransform implementation could be found.

    """
    if tag is None or tag not in self._ptransform_by_tag:
      return self._ptransform_by_tag[self._GENERAL_ENVIRONMENT_TAG], None
    return self._ptransform_by_tag[tag], tag.value
Retrieves ptransform for `tag`.

    Args:
      tag: A string key (or None) to retrieve corresponding ptransform.

    Returns:
      A tuple of a registered beam.PTransform implementation and the tag it was
      registered with.

    Raises:
      KeyError: If no registered PTransform implementation could be found.

    
tensorflow_transform/beam/common.py