def object_to_dict(xmp):
    """
    Extracts all XMP data from a given XMPMeta instance organizing it into a
    standard Python dictionary.
    """
    dxmp = dict()
    if not xmp:
        return {}
    for item in xmp:
        if item[-1]['IS_SCHEMA']:
            dxmp[item[0]] = []
        else:
            dxmp[item[0]].append(item[1:])
    return dxmp
