             !self.isPendingRefetch || NSThread.isMainThread(),
             "Attempted to access a \(typeName(self)) outside the main thread while a refetch is in progress."
         )
-        
         return self.fetchedResultsController.indexPathForObject(object)
     }
     

            NSThread.isMainThread(),
            "Attempted to add an observer of type \(typeName(observer)) outside the main thread."
        )
        
        self.removeObserver(observer)
        
        self.registerChangeNotification(

            !self.isPendingRefetch || NSThread.isMainThread(),
            "Attempted to access a \(typeName(self)) outside the main thread while a refetch is in progress."
        )
        return (self.fetchedResultsController.fetchedObjects as? [T] ?? []).indexOf(object)
    }
    
