code: def parse(path: str) -> ParseResult:
      with open(path) as f:
          swagger_json = json.load(f)
      enums = process_enums(swagger_json["definitions"])
      defs = process_definitions(swagger_json["definitions"], enums)
      ops, streaming_refs = process_paths(swagger_json["paths"], enums)
      defs.update(streaming_refs)
      link_all_refs(defs)
  
      info_keys = ("title", "description", "version")
      info_json = swagger_json["info"]
      info = ApiInfo(
          **{
              **{k: info_json[k] for k in info_keys if k in info_json},
              **{"contact": info_json["contact"]["email"]},
          }
      )
  
      return ParseResult(ops=ops, defs=defs, info=info)
  
imports: import json
  import logging
  import sys
  import typing
  from dataclasses import dataclass, field
  import typing_extensions
label_desc: Use image node_id 8 for calling a global function with example usage: parse(path) and returns: ParseResult