Can two different block components refer to the same fn?

HI. From this sample (Blocks And Event Listeners), is “def greet” being used by both the button_click, and the api_name? Is this standard?

import gradio as gr

def greet(name):
return "Hello " + name + “!”

with gr.Blocks() as demo:
name = gr.Textbox(label=“Name”)
output = gr.Textbox(label=“Output Box”)
greet_btn = gr.Button(“Greet”), inputs=name, outputs=output, api_name=“greet”)