         return try context.asDecodingContext { try decode(entity, from: data) }
     }
 }
-#endif

    }
}

#if canImport(Combine)
import Combine

extension TopLevelDecoder {
    /// Decodes the entity from a given `Input` using its `DTO` type.
    ///

    /// - Throws: Any error thrown by `Entity.findOrCreate`, `TopLevelDecoder.decode(_: from:)` or `NSManagedObjectContext.decodingContext(at:)`
    /// - Note: Only use this method inside a closure submitted to `NSManagedObject.asDecodingContext(do:)`.
    /// - SeeAlso: `TopLevelDecoder.decode(_:from:in:)`
    public func decode<Entity: CoreDataDecodable>(_ entity: Entity.Type, from input: Input) throws -> Entity {
        return try .findOrCreate(for: decode(entity.DTO.self, from: input), in: .decodingContext())
    }

