code: def _parse_saved_model(path):
    
    # Based on tensorflow/python/saved_model/loader.py implementation.
    path_to_pb = _get_saved_model_proto_path(path)
    file_content = tf_v1.gfile.Open(path_to_pb, "rb").read()
    saved_model = saved_model_pb2.SavedModel()
    try:
      saved_model.ParseFromString(file_content)
    except message.DecodeError as e:
      raise IOError("Cannot parse file %s: %s." % (path_to_pb, str(e)))
    return saved_model
docs: Reads the savedmodel.pb file containing `SavedModel`.