While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
)
    def test_prime_and_destroy_containers(self):
        executor = lambda_api.LAMBDA_EXECUTOR
        func_name = f"test_prime_and_destroy_containers_{short_uid()}"
        func_arn = lambda_api.func_arn(func_name)
        
        executor.cleanup()
        self.assertEqual(0, len(executor.get_all_container_names()))
        
        testutil.create_lambda_function(
            func_name=func_name,
            handler_file=TEST_LAMBDA_ENV,
            libs=TEST_LAMBDA_LIBS,
            envvars={"Hello": "World"},
        )
        self.assertEqual(0, len(executor.get_all_container_names()))
        self.assertDictEqual({}, executor.function_invoke_times)
        
        durations = []
        num_iterations = 3
        for i in range(0, num_iterations + 1):
            prev_invoke_time = None
            if i > 0:
                prev_invoke_time = executor.function_invoke_times[func_arn]
            start_time = time.time()
            self.lambda_client.invoke(FunctionName=func_name, Payload=b"{}")
            duration = time.time() - start_time
            self.assertEqual(1, len(executor.get_all_container_names()))
            
            if i > 0: