def METHOD_NAME(
    terrascript: Terrascript, workerFleets: list[dict[str, Any]]
) -> list[JenkinsWorkerFleet]:
    desired_state = []
    for f in workerFleets:
        namespace = f["namespace"]
        account = f["account"]
        identifier = f["identifier"]
        specs = get_external_resource_specs(namespace)
        found = False
        for spec in specs:
            if spec.provider != "asg":
                continue
            if (spec.provisioner_name, spec.identifier) == (account, identifier):
                found = True
                values = terrascript.init_values(spec, init_tags=False)
                region = (
                    values.get("region") or spec.provisioner["resourcesDefaultRegion"]
                )
                f["name"] = identifier
                f["fleet"] = identifier
                f["region"] = region
                f["minSize"] = values.get("min_size")
                f["maxSize"] = values.get("max_size")
                f["computerConnector"] = {
                    "sSHConnector": {"credentialsId": f["credentialsId"]}
                }
                f = dict((k, v) for k, v in f.items() if v is not None)
                desired_state.append(JenkinsWorkerFleet(**f))
                break
        if not found:
            raise ValueError(
                f"Could not find asg identifier {identifier} "
                f'for account {account} in namespace {namespace["name"]}'
            )
    return desired_state