def SetApiQueryScheduleStatus(api_query, status=None):
  if api_query:
    if status is None:
      api_query.is_scheduled = not api_query.is_scheduled
    elif status:
      api_query.is_scheduled = True
    else:
      api_query.is_scheduled = False

    api_query.put()
    return True
  return False
Change the scheduling status of an API Query.
dataset/ETHPy150Open googleanalytics/google-analytics-super-proxy/src/controllers/util/schedule_helper.py/SetApiQueryScheduleStatus