def METHOD_NAME(self, data_sample, **kwargs):
    """Get text instance predictions of one image.
    Args:
        pred_result (tuple(Tensor)): Prediction results of an image.
        data_sample (TextDetDataSample): Datasample of an image.
        **kwargs: Other parameters. Configurable via ``__init__.train_cfg``
            and ``__init__.test_cfg``.
    Returns:
        TextDetDataSample: A new DataSample with predictions filled in.
        The polygon/bbox results are usually saved in
        ``TextDetDataSample.pred_instances.polygons`` or
        ``TextDetDataSample.pred_instances.bboxes``. The confidence scores
        are saved in ``TextDetDataSample.pred_instances.scores``.
    """
    data_sample = data_sample.cpu().numpy()
    pred_instances = data_sample.pred_instances
    data_sample.pred_instances.polygons = list(
        map(bezier2poly, pred_instances.beziers))
    return data_sample