code: def test_cleanup_if_empty(
      metadata_file_mock, operation_storage_mock, disk_queue_mock
  ):
      # given
      container_id = UniqueId(str(uuid4()))
      container_type = ContainerType.RUN
  
      # and
      metadata_file = metadata_file_mock.return_value
      operation_storage = operation_storage_mock.return_value
      disk_queue = disk_queue_mock.return_value
      disk_queue.is_empty.return_value = True
      disk_queue.size.return_value = 0
  
      # and
      processor = AsyncOperationProcessor(
          container_id=container_id,
          container_type=container_type,
          backend=MagicMock(),
          lock=MagicMock(),
          queue=MagicMock(),
      )
  
      # and
      processor.start()
  
      # when
      processor.stop(seconds=1)
  
      # then
      disk_queue.close.assert_called()
      metadata_file.close.assert_called()
      disk_queue.is_empty.assert_called()
  
      disk_queue.cleanup_if_empty.assert_called()
      operation_storage.cleanup.assert_not_called()
      metadata_file.cleanup.assert_called()
  
file_path: neptune-client/tests/unit/neptune/new/internal/operation_processors/test_async_operation_processor.py
imports: from uuid import uuid4
  from mock import MagicMock, patch
  from neptune.internal.container_type import ContainerType
  from neptune.internal.id_formats import UniqueId
  from neptune.internal.operation_processors.async_operation_processor import AsyncOperationProcessor
label_desc: Use image node_id 2 for calling a global function with example usage: test_cleanup_if_empty(metadata_file_mock, operation_storage_mock, disk_queue_mock) without return types