def tf_op(
      self, py_fun):
    """Apply any shape-preserving function to the underlying expression."""
    with tf.name_scope('tf_op'):
      return self.context.as_nql(py_fun(self.tf), self._type_name)
Apply any shape-preserving function to the underlying expression.
language/nql/nql/__init__.py