code: def test_cannot_resolve_host(self, gethostname_mock):
      # given
      token = (
          "eyJhcGlfYWRkcmVzcyI6Imh0dHBzOi8vdWkuc3RhZ2UubmVwdHVuZS5tbCIsImFwaV91cmwiOiJodHRwczovL3VpLn"
          "N0YWdlLm5lcHR1bmUuYWkiLCJhcGlfa2V5IjoiOTgzOGQ5NTQtNDAwMy0xMWU5LWJmNTAtMjMxOTgzNTVkYTY2In0="
      )
  
      gethostname_mock.side_effect = socket.gaierror
  
      # expect
      with self.assertRaises(CannotResolveHostname):
          HostedNeptuneBackendApiClient(token)
  
file_path: neptune-client/tests/unit/neptune/legacy/internal/backends/test_hosted_neptune_backend.py
imports: import socket
  import unittest
  import mock
  from mock import MagicMock
  from neptune.legacy.exceptions import CannotResolveHostname, DeprecatedApiToken, UnsupportedClientVersion
  from neptune.legacy.internal.api_clients import HostedNeptuneBackendApiClient
label_desc: Use image node_id 8 for calling the TestHostedNeptuneBackend obj's underlying member method code with example usage: obj.test_cannot_resolve_host(gethostname_mock) without return types