def METHOD_NAME(self, tasks, **kwargs):
    assert len(tasks) == 1
    task = tasks[0]
    image_url = self._get_image_url(task)
    image_path = self.get_local_path(image_url)
    model_results = inference_detector(self.model,
                                       image_path).pred_instances
    results = []
    all_scores = []
    img_width, img_height = get_image_size(image_path)
    print(f'>>> model_results: {model_results}')
    print(f'>>> label_map {self.label_map}')
    print(f'>>> self.model.dataset_meta: {self.model.dataset_meta}')
    classes = self.model.dataset_meta.get('classes')
    print(f'Classes >>> {classes}')
    for item in model_results:
        print(f'item >>>>> {item}')
        bboxes, label, scores = item['bboxes'], item['labels'], item[
            'scores']
        score = float(scores[-1])
        if score < self.score_thresh:
            continue
        print(f'bboxes >>>>> {bboxes}')
        print(f'label >>>>> {label}')
        output_label = classes[list(self.label_map.get(label, label))[0]]
        print(f'>>> output_label: {output_label}')
        if output_label not in self.labels_in_config:
            print(output_label + ' label not found in project config.')
            continue
        for bbox in bboxes:
            bbox = list(bbox)
            if not bbox:
                continue
            x, y, xmax, ymax = bbox[:4]
            results.append({
                'from_name': self.from_name,
                'to_name': self.to_name,
                'type': 'rectanglelabels',
                'value': {
                    'rectanglelabels': [output_label],
                    'x': float(x) / img_width * 100,
                    'y': float(y) / img_height * 100,
                    'width': (float(xmax) - float(x)) / img_width * 100,
                    'height': (float(ymax) - float(y)) / img_height * 100
                },
                'score': score
            })
            all_scores.append(score)
    avg_score = sum(all_scores) / max(len(all_scores), 1)
    print(f'>>> RESULTS: {results}')
    return [{'result': results, 'score': avg_score}]