def METHOD_NAME(
    view_transform: ocio.ViewTransform,
) -> Optional[ocio.Transform]:
    """
    Extract a scene-to-display transform from a view transform
    instance.
    :param view_transform: View transform instance
    :return: Scene to display transform, if available
    """
    # REFERENCE_SPACE_SCENE
    if view_transform.getReferenceSpaceType() == ocio.REFERENCE_SPACE_SCENE:
        scene_to_display_ref_tf = view_transform.getTransform(
            ocio.VIEWTRANSFORM_DIR_FROM_REFERENCE
        )
        if not scene_to_display_ref_tf:
            display_to_scene_ref_tf = view_transform.getTransform(
                ocio.VIEWTRANSFORM_DIR_TO_REFERENCE
            )
            if display_to_scene_ref_tf:
                scene_to_display_ref_tf = ocio.GroupTransform(
                    [display_to_scene_ref_tf], ocio.TRANSFORM_DIR_INVERSE
                )
    # REFERENCE_SPACE_DISPLAY
    else:
        scene_to_display_ref_tf = view_transform.getTransform(
            ocio.VIEWTRANSFORM_DIR_TO_REFERENCE
        )
        if not scene_to_display_ref_tf:
            display_to_scene_ref_tf = view_transform.getTransform(
                ocio.VIEWTRANSFORM_DIR_FROM_REFERENCE
            )
            if display_to_scene_ref_tf:
                scene_to_display_ref_tf = ocio.GroupTransform(
                    [display_to_scene_ref_tf], ocio.TRANSFORM_DIR_INVERSE
                )
    # Has transform?
    if scene_to_display_ref_tf:
        return scene_to_display_ref_tf
    else:
        return None