<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_task_ops(task_type=TaskType.ALG_CTRL):
 """Returns an operations list based on the specified task index. Args: task_type: indicates the task type used. Returns: List of the eligible ops. """

    try:
      return LearnToExecuteState.TASK_TYPE_OPS[task_type]
    except KeyError:
      raise KeyError("Bad task_type '%s', check config." % task_type)