When I try this code in Python 2.7: if __name__ == "__main__": file_name = "tensorflow/examples/label_image/data/grace_hopper.jpg" ... with tf.Session(graph=graph) as sess: results = sess.run(output_operation.outputs[0], { input_operation.outputs[0]: t }) results = np.squeeze(results) top_k = results.argsort()[-5:][::-1] labels = load_labels(label_file) j=0 for i in top_k: print(labels, results) age[j]=labels j=j+1 if age[0] == "youngadult": t = 0 elif age[0] == "youth": t = 1 elif age[0] == "adult": t = 2 elif age[0] == "seniors": t = 3 elif age[0] == "children": t = 4 else: t = 5 return t I get an error that says: SyntaxError: 'return' outside function. What is wrong, and how can I fix it? Continue reading...