def METHOD_NAME(self, inputs: Dict[str, Any],
                   **postprocess_params) -> List:
    """process the prediction results and output as chunks
    Args:
        inputs (Dict[str, Any]): should be tensors from model
    Returns:
        List: The output chunks
    """
    text = inputs['text']
    # TODO post_process does not support batch for now.
    if OutputKeys.PREDICTIONS not in inputs:
        logits = inputs[OutputKeys.LOGITS]
        if len(logits.shape) == 3:
            logits = logits[0]
        predictions = torch.argmax(logits, dim=-1)
    else:
        predictions = inputs[OutputKeys.PREDICTIONS]
        if len(predictions.shape) == 2:
            predictions = predictions[0]
    offset_mapping = inputs['offset_mapping']
    if len(offset_mapping.shape) == 3:
        offset_mapping = offset_mapping[0]
    label_mask = inputs.get('label_mask')
    if label_mask is not None:
        masked_lengths = label_mask.sum(-1).long().cpu().item()
        offset_mapping = torch.narrow(
            offset_mapping, 0, 0,
            masked_lengths)  # index_select only move loc, not resize
        if len(label_mask.shape) == 2:
            label_mask = label_mask[0]
        predictions = predictions.masked_select(label_mask)
    offset_mapping = torch_nested_numpify(
        torch_nested_detach(offset_mapping))
    predictions = torch_nested_numpify(torch_nested_detach(predictions))
    labels = [self.id2label[x] for x in predictions]
    chunks = []
    chunk = {}
    for label, offsets in zip(labels, offset_mapping):
        if label[0] in 'BS':
            if chunk:
                chunk['span'] = text[chunk['start']:chunk['end']]
                chunks.append(chunk)
            chunk = {
                'type': label[2:],
                'start': offsets[0],
                'end': offsets[1]
            }
        if label[0] in 'I':
            if not chunk:
                chunk = {
                    'type': label[2:],
                    'start': offsets[0],
                    'end': offsets[1]
                }
        if label[0] in 'E':
            if not chunk:
                chunk = {
                    'type': label[2:],
                    'start': offsets[0],
                    'end': offsets[1]
                }
        if label[0] in 'IES':
            if chunk:
                chunk['end'] = offsets[1]
        if label[0] in 'ES':
            if chunk:
                chunk['span'] = text[chunk['start']:chunk['end']]
                chunks.append(chunk)
                chunk = {}
    if chunk:
        chunk['span'] = text[chunk['start']:chunk['end']]
        chunks.append(chunk)
    return chunks