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.
Payload=json.dumps(
                    {
                        "state_machine_arn": sm_arn,
                        "region_name": stepfunctions_client.meta.region_name,
                        "input": {},
                    }
                ),
            )
            time.sleep(1)
            rs = stepfunctions_client.list_executions(stateMachineArn=sm_arn)
            
            assert 1 == len([ex for ex in rs["executions"] if ex["stateMachineArn"] == sm_arn])
        finally:
            
            stepfunctions_client.delete_state_machine(stateMachineArn=sm_arn)
    @pytest.mark.skipif(
        not use_docker(), reason="Test for docker python runtimes not applicable if run locally"
    )
    @parametrize_python_runtimes
    def test_python_runtime_correct_versions(self, lambda_client, create_lambda_function, runtime):
        """Test different versions of python runtimes to report back the correct python version"""
        function_name = f"test_python_executor_{short_uid()}"
        create_lambda_function(
            func_name=function_name,
            handler_file=TEST_LAMBDA_PYTHON_VERSION,
            runtime=runtime,
        )
        result = lambda_client.invoke(
            FunctionName=function_name,
            Payload=b"{}",