def _convert_to_numpy(input_dict):
      """Converts eager tensors to numpy arrays."""
      return {
          k: np.asarray(v) if isinstance(v, tf.Tensor) else v
          for k, v in input_dict.items()
      }
Converts eager tensors to numpy arrays.
tensorflow_transform/beam/impl.py