from fastapi import BackgroundTasks def send_email(to, subject, body): # code to send email pass def notify_user(to, subject, body): background_tasks.add_task(send_email, to, subject, body) background_tasks = BackgroundTasks() notify_user('[email protected]', 'Test Subject', 'Test Body')In the above example, we define two functions, "send_email" and "notify_user". We want to call the "send_email" function in the background, passing it the arguments "to", "subject", and "body" which have been received by the "notify_user". We use the "add_task" method to add the task to the background tasks queue. The example demonstrates the importance of passing arguments which will be accepted by the function in the background. The package library that is used here is the FastAPI BackgroundTasks library.