def METHOD_NAME(enable_live_view):
    resource = models.DevToolPortalResource.deserialize(json.loads('{"properties":{"provisioningState": "Succeeded"}}'))
    resource.properties.features = models.DevToolPortalFeatureSettings(
        application_live_view=models.DevToolPortalFeatureDetail(
            state=models.DevToolPortalFeatureState.ENABLED if enable_live_view \
                    else models.DevToolPortalFeatureState.DISABLED
        )
    )
    return resource