code: def test_with_socket_bind_error(
      self, socket_patches, model_service_worker
  ):
      bind_exception = socket.error("binding error")
      socket_patches.socket.bind.side_effect = bind_exception
      with pytest.raises(Exception):
          model_service_worker.run_server()
  
      socket_patches.socket.bind.assert_called()
      socket_patches.socket.listen.assert_not_called()
  
imports: import os
  import socket
  import sys
  from collections import namedtuple
  import mock
  import pytest
  from mock import Mock
  from ts.model_service_worker import TorchModelServiceWorker
  from ts.service import Service
label_desc: Use image node_id 1 for calling the TestRunServer obj's underlying member method code with example usage: obj.test_with_socket_bind_error(socket_patches, model_service_worker) without return types