def METHOD_NAME(self):
    def custom_fn():
        pass
    class CustomClass:
        pass
    def check_get_in_thread():
        with object_registration.custom_object_scope(
            {"CustomClass": CustomClass, "custom_fn": custom_fn}
        ):
            actual_custom_fn = keras.activations.get("custom_fn")
            self.assertEqual(actual_custom_fn, custom_fn)
            actual_custom_class = keras.regularizers.get("CustomClass")
            self.assertEqual(actual_custom_class.__class__, CustomClass)
        with object_registration.custom_object_scope(
            {"CustomClass": CustomClass, "custom_fn": custom_fn}
        ):
            actual_custom_fn = keras.activations.get("custom_fn")
            self.assertEqual(actual_custom_fn, custom_fn)
            actual_custom_class = keras.regularizers.get("CustomClass")
            self.assertEqual(actual_custom_class.__class__, CustomClass)
            checked_thread = self.checkedThread(check_get_in_thread)
            checked_thread.start()
            checked_thread.join()