<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_rows(data, *rows):
 """Extract rows specified in the argument list. [[30,40],[50,60]] """

    try:
        # for python 2.2
        # return [data[r] for r in rows]
        out = []
        for r in rows:
            out.append(data[r])
        return out
    except IndexError:
        raise IndexError("data=%s rows=%s" % (data, rows))
    return out