def METHOD_NAME(image, problem_type):
    rekognition_client = boto3.client("rekognition")
    image = RekognitionImage.from_image(image, rekognition_client)
    names = []
    box_sets = []
    label_set = []
    if problem_type == "labels":
        labels = image.detect_labels(100)
        for label in labels:
            if label.get("Instances"):
                name = label.get("Name")
                names.append(name)
                label_set.append({"name": name, "confidence": label.get("Confidence")})
                box_sets.append(
                    [inst["BoundingBox"] for inst in label.get("Instances")]
                )
        colors = ["aqua", "red", "white", "blue", "yellow", "green"]
        im_b64 = show_bounding_boxes(
            image.image["Bytes"], box_sets, names, colors[: len(names)]
        )
        return im_b64, label_set
    elif problem_type == "celebrities":
        labels, _ = image.recognize_celebrities()
        for label in labels:
            name = label.get("Name")
            names.append(name)
            label_set.append(
                {"Object": name, "Confidence": label.get("Face").get("Confidence")}
            )
            box_sets.append([label.get("Face").get("BoundingBox")])
        im_b64 = show_bounding_boxes(image.image["Bytes"], box_sets, names, ["aqua"])
        return im_b64, label_set