<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_mfd_params(src):
 """ Extracts the MFD parameters from an object """

    tags = get_taglist(src)
    if "incrementalMFD" in tags:
        mfd_node = src.nodes[tags.index("incrementalMFD")]
    elif "truncGutenbergRichterMFD" in tags:
        mfd_node = src.nodes[tags.index("truncGutenbergRichterMFD")]
    elif "arbitraryMFD" in tags:
        mfd_node = src.nodes[tags.index("arbitraryMFD")]
    elif "YoungsCoppersmithMFD" in tags:
        mfd_node = src.nodes[tags.index("YoungsCoppersmithMFD")]
    else:
        raise ValueError("Source %s contains no supported MFD type!" % src.tag)
    data = []
    rates = []
    for key, param, vtype in MFD_PARAMS:
        if key in mfd_node.attrib and mfd_node.attrib[key] is not None:
            data.append((param, mfd_node.attrib[key]))
        else:
            data.append((param, None))
    if ("incrementalMFD" or "arbitraryMFD") in mfd_node.tag:
        # Extract Rates
        rates = ~mfd_node.occurRates
        n_r = len(rates)
        if n_r > MAX_RATES:
            raise ValueError("Number of rates in source %s too large "
                             "to be placed into shapefile" % src.tag)
        rate_dict = dict([(key, rates[i] if i < n_r else None)
                          for i, (key, _) in enumerate(RATE_PARAMS)])
    elif "YoungsCoppersmithMFD" in mfd_node.tag:
        rate_dict = dict([(key, mfd_node.attrib['characteristicRate'])
                          for i, (key, _) in enumerate(RATE_PARAMS)])
    else:
        rate_dict = dict([(key, None)
                          for i, (key, _) in enumerate(RATE_PARAMS)])
    return dict(data), rate_dict