(thing)
Takes either tf.placeholder of TfInput and outputs equivalent TfInput
Takes either tf.placeholder of TfInput and outputs equivalent TfInput
Takes either tf . placeholder of TfInput and outputs equivalent TfInput
def ensure_tf_input(thing):
    """Takes either tf.placeholder of TfInput and outputs equivalent TfInput"""
    if isinstance(thing, TfInput):
        return thing
    elif is_placeholder(thing):
        return PlacholderTfInput(thing)
    else:
        raise ValueError("Must be a placeholder or TfInput")
def ensure_tf_input ( thing ) : if isinstance ( thing , TfInput ) : return thing elif is_placeholder ( thing ) : return PlacholderTfInput ( thing ) else : raise ValueError ( "Must be a placeholder or TfInput" )