   /// - Parameters:
   ///   - isRollBackEnabled: Enables rollback if any error occurs (default true).
   /// - Returns: a success case if the save succeeds, otherwise a failure case with an associated `Error` instance.
+  /// - Throws: throws an error in cases of failure.
   @discardableResult
   private func saveChanges(andEnableRollBack isRollBackEnabled: Bool = true) -> SaveResult {
     do {

  ///   - key: Object key
  ///   - store: NSPersistentStore where is stored the metadata.
  public func setMetaDataObject(_ object: AnyObject?, with key: String, for store: NSPersistentStore) {
    performSave {
      guard let psc = self.persistentStoreCoordinator else { fatalError("Persistent Store Coordinator missing.") }
      var md = psc.metadata(for: store)
      md[key] = object
      psc.setMetadata(md, for: store)
    }
  }
  
  /// **Mechanica**

    return context
  }
  
}

// MARK: - Save

extension NSManagedObjectContext {

  //  /// **Mechanica**
  //  ///
  //  /// Asynchronously attempts to commit unsaved changes or rollbacks if any error occurs.
  //  /// - Parameters:
  //  ///   - isRollBackEnabled: Enables rollback if any error occurs (default true).
  //  public func performSave(orRollBack isRollBackEnabled: Bool = true) {
  //    perform {
  //      [unowned self] in
  //      _ = self.saveChanges(andEnableRollBack: isRollBackEnabled)
  //    }
  //  }
  
  
  /// **Mechanica**
  ///
  /// Result of void representing `success` or an instance of `Error`.
  public enum SaveResult {
    /// A success case
    case success
    /// A failure case with an associated `Error` instance.
    case failure(Swift.Error)
  }
  
  /// **Mechanica**
  ///
