def as_tf(self, expr):
    """Convert a NeuralQueryExpression expression to a Tensorflow expression.

    If called on a Tensorflow expression, it will return expr unchanged.

    Args:
      expr: either a NeuralQueryExpression or a Tensorflow expression.

    Returns:
      a Tensorflow expression
    """
    if isinstance(expr, NeuralQueryExpression):
      return expr.tf
    else:
      return expr
Convert a NeuralQueryExpression expression to a Tensorflow expression.

    If called on a Tensorflow expression, it will return expr unchanged.

    Args:
      expr: either a NeuralQueryExpression or a Tensorflow expression.

    Returns:
      a Tensorflow expression
    
language/nql/nql/__init__.py