def _filter_tasks_by_completed(tasks, is_completed):
    """
    Filters tasks based on the completion status.

    Args:
      tasks ([{str:str}]): List of tasks from asana API.  At the very least,
        must have the `completed` key.
      is_completed (bool or None): Whether to return tasks that are completed.
        False will return only uncompleted tasks.  True will return only
        completed tasks, while None can be used to return tasks regardless of
        completion status.

    Returns:
      filt_tasks ([{str:str}]): The tasks that meet the filter criteria.  This
        will be all tasks if `is_completed` is None; or will be tasks that
        match the provided `is_completed` status.
    """
    if is_completed is None:
        return tasks

    return [t for t in tasks if t['completed'] == is_completed]