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.
result["message"],
            )
    def test_list_function_versions(self):
        with self.app.test_request_context():
            self._create_function(self.FUNCTION_NAME)
            lambda_api.publish_version(self.FUNCTION_NAME)
            lambda_api.publish_version(self.FUNCTION_NAME)
            result = json.loads(lambda_api.list_versions(self.FUNCTION_NAME).get_data())
            for version in result["Versions"]:
                
                version.pop("RevisionId", None)
            latest_version = {}
            latest_version["CodeSize"] = self.CODE_SIZE
            latest_version["CodeSha256"] = self.CODE_SHA_256
            latest_version["FunctionArn"] = (
                str(lambda_api.func_arn(self.FUNCTION_NAME)) + ":$LATEST"
            )
            latest_version["FunctionName"] = str(self.FUNCTION_NAME)
            latest_version["Handler"] = str(self.HANDLER)
            latest_version["Runtime"] = str(self.RUNTIME)
            latest_version["Timeout"] = self.TIMEOUT
            latest_version["Description"] = ""
            latest_version["MemorySize"] = self.MEMORY_SIZE
            latest_version["Role"] = self.ROLE
            latest_version["KMSKeyArn"] = None
            latest_version["VpcConfig"] = None
            latest_version["LastModified"] = isoformat_milliseconds(self.LAST_MODIFIED) + "+0000"
            latest_version["TracingConfig"] = self.TRACING_CONFIG
            latest_version["Version"] = "$LATEST"
            latest_version["State"] = "Active"