code: def test_run_with_file_source(self, json_serperdev_openapi_spec):
      # test we can extract functions from openapi spec given in file
      service = OpenAPIServiceToFunctions()
      # write the spec to NamedTemporaryFile and check that it is parsed correctly
      with tempfile.NamedTemporaryFile() as tmp:
          tmp.write(json_serperdev_openapi_spec.encode("utf-8"))
          tmp.seek(0)
          result = service.run(
              sources=[tmp.name],
              system_messages=[
                  "Some system message we don't care about here"
              ],
          )
          assert len(result["documents"]) == 1
          doc = result["documents"][0]
  
          # check that the content is as expected
          assert (
              doc.content
              == '{"name": "search", "description": "Search the web with Google", "parameters": {"type": "object", '
              '"properties": {"requestBody": {"type": "object", "properties": {"q": {"type": "string"}}}}}}'
          )
  
          # check that the metadata is as expected
          assert (
              doc.meta["system_message"]
              == "Some system message we don't care about here"
          )
          assert doc.meta["spec"] == json.loads(
              json_serperdev_openapi_spec
          )
  
file_path: haystack/test/components/converters/test_openapi_functions.py
imports: import json
  import sys
  import tempfile
  import pytest
  from haystack.components.converters import OpenAPIServiceToFunctions
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 4 for calling the TestOpenAPIServiceToFunctions obj's underlying member method code with example usage: obj.test_run_with_file_source(json_serperdev_openapi_spec) without return types