def export_label_to_label_studio(label, label_type=None, full_result=None):
    """Exports a label to the Label Studio format.

    Args:
        label: a :class:`fiftyone.core.labels.Label` or list of
            :class:`fiftyone.core.labels.Label` instances
        label_type (None): the label type to use when exporting the annotation.
            This argument is only used when exporting object detections. By
            default, only the bounding boxes are exported, but you can pass
            ``label_type="instances"`` to export them as brush labels encoding
            the instance masks instead
        full_result (None): if non-empty, return the full Label Studio result

    Returns:
        a dictionary or a list in Label Studio format
    """
    # TODO model version and model score
    if label is None:
        result_value = {}
        ls_type = None
        ids = None
    elif _check_type(label, fol.Classification, fol.Classifications):
        result_value, ls_type, ids = _to_classification(label)
    elif _check_type(label, fol.Detection, fol.Detections):
        if label_type == "instances":
            size = (
                full_result["original_width"],
                full_result["original_height"],
            )
            result_value, ls_type, ids = _to_instance(label, size)
        else:
            result_value, ls_type, ids = _to_detection(label)
    elif _check_type(label, fol.Polyline, fol.Polylines):
        result_value, ls_type, ids = _to_polyline(label)
    elif _check_type(label, fol.Keypoint, fol.Keypoints):
        result_value, ls_type, ids = _to_keypoint(label)
    elif isinstance(label, fol.Segmentation):
        result_value, ls_type, ids = _to_segmentation(label)
    elif isinstance(label, fol.Regression):
        result_value, ls_type, ids = _to_regression(label)
    else:
        raise ValueError("Label type %s is not supported" % type(label))

    if full_result:
        # return full LS result
        if not isinstance(result_value, (list, tuple)):
            result_value = [result_value]
            ids = [ids]

        return [
            _update_dict(
                full_result,
                dict(value=r, type=ls_type, id=i),
            )
            for r, i in zip(result_value, ids)
        ]

    return result_value
Exports a label to the Label Studio format.

    Args:
        label: a :class:`fiftyone.core.labels.Label` or list of
            :class:`fiftyone.core.labels.Label` instances
        label_type (None): the label type to use when exporting the annotation.
            This argument is only used when exporting object detections. By
            default, only the bounding boxes are exported, but you can pass
            ``label_type="instances"`` to export them as brush labels encoding
            the instance masks instead
        full_result (None): if non-empty, return the full Label Studio result

    Returns:
        a dictionary or a list in Label Studio format
    
fiftyone/utils/labelstudio.py