'select(jt, jobid, task_types, task_states, text, count, offset) -> TaskList
Retrieve a TaskList from Hadoop according to the given criteria.
task_types is a set of job_tracker.VALID_TASK_TYPES. A value to None means everything.
task_states is a set of job_tracker.VALID_TASK_STATES. A value to None means everything.'

@staticmethod
def select(jt, jobid, task_types, task_states, text, count, offset):

    assert ((task_types is None) or job_tracker.VALID_TASK_TYPES.issuperset(task_types))
    assert ((task_states is None) or job_tracker.VALID_TASK_STATES.issuperset(task_states))
    if (task_types is None):
        task_types = job_tracker.VALID_TASK_TYPES
    if (task_states is None):
        task_states = job_tracker.VALID_TASK_STATES
    tjobid = jt.thriftjobid_from_string(jobid)
    thrift_list = jt.get_task_list(tjobid, task_types, task_states, text, count, offset)
    return TaskList.from_thriftTaskList(thrift_list, jt)
