code: def test_cloud_compute_with_mounts():
      mount_1 = Mount(source="s3://foo/", mount_path="/foo")
      mount_2 = Mount(source="s3://foo/bar/", mount_path="/bar")
  
      cloud_compute = CloudCompute("gpu", mounts=mount_1)
      assert cloud_compute.mounts == mount_1
  
      cloud_compute = CloudCompute("gpu", mounts=[mount_1, mount_2])
      assert cloud_compute.mounts == [mount_1, mount_2]
  
      cc_dict = cloud_compute.to_dict()
      assert "mounts" in cc_dict
      assert cc_dict["mounts"] == [
          {"mount_path": "/foo", "source": "s3://foo/"},
          {"mount_path": "/bar", "source": "s3://foo/bar/"},
      ]
  
      assert CloudCompute.from_dict(cc_dict) == cloud_compute
  
file_path: pytorch-lightning/tests/tests_app/utilities/packaging/test_cloud_compute.py
imports: import pytest
  from lightning.app import CloudCompute
  from lightning.app.storage import Mount
label_desc: Use image node_id 3 for calling a global function with example usage: test_cloud_compute_with_mounts() without return types