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.
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.lambda_client.invoke(FunctionName=func_name, Payload=b"{}")
        self.assertEqual(1, len(executor.get_all_container_names()))
        
        executor.idle_container_destroyer()
        self.assertEqual(1, len(executor.get_all_container_names()))
        
        executor.function_invoke_times[func_arn] = (
            int(time.time() * 1000) - lambda_executors.MAX_CONTAINER_IDLE_TIME_MS
        )
        executor.idle_container_destroyer()
        def assert_container_destroyed():
            self.assertEqual(0, len(executor.get_all_container_names()))
        retry(assert_container_destroyed, retries=3)
        
        testutil.delete_lambda_function(func_name)
class TestLocalExecutors(unittest.TestCase):
    def test_python3_runtime_multiple_create_with_conflicting_module(self):
        lambda_client = aws_stack.create_external_boto_client("lambda")
        original_do_use_docker = lambda_api.DO_USE_DOCKER
        try:
            
            lambda_api.DO_USE_DOCKER = False