def METHOD_NAME(image_paths, root_path):
    data_are_2d = False
    data_are_3d = False
    # First of all need to define data type we are working with
    for image_path in image_paths:
        # .bin files are expected to be converted to .pcd before this code
        if os.path.splitext(image_path)[1].lower() == '.pcd':
            data_are_3d = True
        else:
            data_are_2d = True
    assert not (data_are_3d and data_are_2d), 'Combined data types 2D and 3D are not supported'
    if data_are_2d:
        return _detect_related_images_2D(image_paths, root_path)
    elif data_are_3d:
        return _detect_related_images_3D(image_paths, root_path)
    return {}