code: def test_res2literals(self):
      assert_almost_equal(connector.res2literals([]), np.NaN)
      assert (
          connector.res2literals(
              [
                  {
                      "o": {
                          "type": "literal",
                          "xml:lang": "en",
                          "value": "foo",
                      }
                  }
              ]
          )
          == "foo"
      )
      assert (
          connector.res2literals(
              [
                  {
                      "o": {
                          "type": "literal",
                          "xml:lang": "en",
                          "value": "foo",
                      }
                  },
                  {
                      "o": {
                          "type": "literal",
                          "xml:lang": "en",
                          "value": "egg",
                      }
                  },
              ]
          )
      ) == ("foo", "egg")
      assert (
          connector.res2literals(
              [
                  {
                      "o": {
                          "type": "literal",
                          "xml:lang": "en",
                          "value": 42,
                      }
                  },
                  {
                      "o": {
                          "type": "literal",
                          "xml:lang": "en",
                          "value": "foo",
                      }
                  },
              ]
          )
      ) == (42, "foo")
  
file_path: pyRDF2Vec/tests/test_connectors.py
imports: import asyncio
  import aiohttp
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from pyrdf2vec.connectors import Connector, SPARQLConnector
label_desc: Use image node_id 3 for calling the TestSPARQLConnector obj's underlying member method code with example usage: obj.test_res2literals() without return types