def getLastDate(ti):
    """
    Pull the date from xcom and return one task id, or multiple task IDs if they are inside a list, to be executed
    Args:
        ti: task instance argument used by Airflow to push and pull xcom data

    Returns: the airflow task ID to be executed based on the xcom data
    """

    # pull the xcom data (in this case a list containing only one element: the date string or None)
    fetchedDate = ti.xcom_pull(key='fetchedDate', task_ids=['getLastProcessedDate'])
    # if the date is None then execute the 'parseJsonFile' task, else execute the 'endRun' task
    if fetchedDate[0] is not None:
        return 'parseJsonFile'
    return 'endRun'