def METHOD_NAME(tasks, project=None, return_id_list=False, tz=None):
    data = []
    ids = []
    for task in tasks:
        item = format_task_info_data(task, project, tz)
        data.append(item)
        if return_id_list:
            ids.append(item["id"])
    if not return_id_list:
        return data
    return data, ids