code: def test_create_work_proxy_http(mock_client, tmpdir):
      cloud_backend = CloudBackend("")
      non_matching_spec = Mock()
      app = MagicMock()
  
      mocked_drive = MagicMock(spec=Drive)
      setattr(mocked_drive, "id", "foobar")
      setattr(mocked_drive, "protocol", "lit://")
      setattr(mocked_drive, "component_name", "test-work")
      setattr(mocked_drive, "allow_duplicates", False)
      setattr(mocked_drive, "root_folder", tmpdir)
      # deepcopy on a MagicMock instance will return an empty magicmock instance. To
      # overcome this we set the __deepcopy__ method `return_value` to equal what
      # should be the results of the deepcopy operation (an instance of the original class)
      mocked_drive.__deepcopy__.return_value = copy(mocked_drive)
  
      work = WorkWithDrive(port=1111)
      work._name = "test-work-name"
      work.drive = mocked_drive
  
      def lightningwork_service_create_lightningwork(
          project_id: str = None,
          spec_lightningapp_instance_id: str = None,
          body: "Body5" = None,
      ):
          assert project_id == "project_id"
          assert spec_lightningapp_instance_id == "app_id"
          assert len(body.spec.network_config) == 1
          assert body.spec.network_config[0].port == 1111
          assert not body.spec.network_config[0].host
          body.spec.network_config[0].host = "x.lightning.ai"
          assert len(body.spec.drives) == 1
          assert (
              body.spec.drives[0].drive.spec.drive_type
              == V1DriveType.NO_MOUNT_S3
          )
          assert (
              body.spec.drives[0].drive.spec.source_type
              == V1SourceType.S3
          )
          assert body.spec.drives[0].drive.spec.source == "lit://foobar"
          assert (
              body.spec.drives[0].drive.metadata.name
              == "test-work-name.drive"
          )
          for v in body.spec.drives[0].drive.status.to_dict().values():
              assert v is None
  
          return body
  
      response_mock = Mock()
      response_mock.lightningworks = [non_matching_spec]
      mock_client().lightningwork_service_list_lightningwork.return_value = (
          response_mock
      )
      mock_client().lightningwork_service_create_lightningwork = (
          lightningwork_service_create_lightningwork
      )
  
      cloud_backend.create_work(app, work)
      assert work._future_url == "http://x.lightning.ai"
      app.work_queues["test-work-name"].put.assert_called_once_with(
          work
      )
  
imports: import json
  import os
  from copy import copy
  from datetime import datetime
  from unittest import mock
  from unittest.mock import ANY, MagicMock, Mock
  import pytest
  from lightning.app import BuildConfig, CloudCompute, LightningWork
  from lightning.app.launcher.lightning_backend import CloudBackend
  from lightning.app.storage import Drive, Mount
  from lightning.app.testing.helpers import EmptyWork
  from lightning.app.utilities.enum import WorkFailureReasons, WorkStageStatus
  from lightning.app.utilities.exceptions import LightningPlatformException
  from lightning_cloud.openapi import Body5, V1DriveType, V1LightningworkState, V1SourceType
  from lightning_cloud.openapi.rest import ApiException
label_desc: Use image node_id 9 for calling a global function with example usage: test_create_work_proxy_http(mock_client, tmpdir) and returns: body