<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_process_list(mc, x_=None, y_=None, p_=None, app_ids=None, applications=None, states=None):
 """Scan a SpiNNaker system's cores filtering by the specified features. Generates ------- (x, y, core, state, runtime_exception, application, app_id) """


    system_info = mc.get_system_info()
    for (x, y), chip_info in sorted(iteritems(system_info)):
        if x_ is not None and x_ != x:
            continue
        if y_ is not None and y_ != y:
            continue

        for p in range(chip_info.num_cores):
            if p_ is not None and p_ != p:
                continue

            try:
                status = mc.get_processor_status(x=x, y=y, p=p)
                keep = (match(str(status.app_id), app_ids) and
                        match(status.app_name, applications) and
                        match(status.cpu_state.name, states))

                if keep:
                    yield (x, y, p,
                           status.cpu_state,
                           status.rt_code,
                           status.app_name,
                           status.app_id)
            except SCPError as e:
                # If an error occurs while communicating with a chip, we bodge
                # it into the "cpu_status" field and continue (note that it
                # will never get filtered out).
                class DeadStatus(object):
                    name = "{}: {}".format(e.__class__.__name__, str(e))
                yield (x, y, p, DeadStatus(), None, "", -1)