def METHOD_NAME(self, value: torch.Tensor) -> 'ActionDataSample':
    """Set score of ``pred_label``."""
    label_data = getattr(self, '_pred_label', LabelData())
    label_data.item = format_score(value)
    if hasattr(self, 'num_classes'):
        assert len(label_data.item) == self.num_classes, \
            f'The length of score {len(label_data.item)} should be '\
            f'equal to the num_classes {self.num_classes}.'
    else:
        self.set_field(
            name='num_classes',
            value=len(label_data.item),
            field_type='metainfo')
    self.pred_scores = label_data
    return self