def is_keras_tensor(x):
 if hasattr(x, '_keras_shape'):
  return True
 else:
  return False

def is_keras_tensor ( x ) : if hasattr ( x , '_keras_shape' ) : return True else : return False
returns whether x is a keras tensor .