def METHOD_NAME(metadata):
    for rel in metadata.iterfind('dxl:Relation', ns):
        part_col = rel.get('PartitionColumns')
        if part_col is not None:
            if rel.find('dxl:Partitions', ns) is None:
                sys.stderr.write(
                    "Warning, %s: file was not properly converted, please run the other script first, exiting...\n" % glob_mdp_name)
                exit(1)
            for index_info in list(rel.find('dxl:IndexInfoList', ns)):
                index_info_mdid = index_info.get('Mdid')
                for index in metadata.iterfind('dxl:Index', ns):
                    if index.get('Mdid') == index_info_mdid:
                        if index.find('dxl:Partitions', ns) is not None:
                            sys.stderr.write(
                                "Warning, %s: file is already converted, exiting...\n" % glob_mdp_name)
                            exit(1)
                        # found a partitioned relation that also has partitioned index(es)
                        convert_partitioned_index(metadata, rel, index)