class_docstr: PyTorch backend model factory 
class_docstr_tok: ["PyTorch","backend","model","factory"]
code: def open(self, model):  # pylint: disable=missing-function-docstring
      metadata = {}
      metadata_files = [
          ("pytorch-metadata.json", ""),
          ("onnx-metadata.json", "onnx::"),
      ]
      path = os.path.dirname(__file__)
      for entry in metadata_files:
          file = os.path.join(path, entry[0])
          with open(file, "r", encoding="utf-8") as handle:
              for item in json.load(handle):
                  name = entry[1] + item["name"]
                  metadata[name] = item
      metadata = Metadata(metadata)
      return _Model(metadata, model)
  
imports: import json
  import os
label_desc: Use image node_id 1 for calling the ModelFactory obj's underlying member method code with example usage: obj.open(model) and returns: _Model