From a Patient object, tasks for the patient can be accessed with the tasks attribute:
importarrowfromcanvas_sdk.v1.data.patientimportPatientfromcanvas_sdk.v1.data.taskimportTaskStatuspatient=Patient.objects.get(id="36950971cb3e4174ad8b9d365abfd6d0")# All tasks for the patient
tasks_for_patient=patient.tasks.all()# Tasks for the patient that are overdue
tasks_for_patient_overdue=patient.tasks.filter(due__lte=arrow.utcnow().datetime,status=TaskStatus.OPEN)
Task objects are also able to have associated TaskLabel objects.