def METHOD_NAME(
    rule_runner: RuleRunner,
    targets: list[Target],
    *,
    extra_args: list[str] | None = None,
) -> list[FmtResult]:
    rule_runner.set_options(
        [
            "--backend-packages=pants.backend.experimental.openapi.lint.openapi_format",
            *(extra_args or ()),
        ],
        env_inherit={"PATH"},
    )
    field_sets = [OpenApiFormatFieldSet.create(tgt) for tgt in targets]
    partitions = rule_runner.request(
        Partitions,
        [
            OpenApiFormatRequest.PartitionRequest(tuple(field_sets)),
        ],
    )
    results = []
    for partition in partitions:
        digest = rule_runner.request(Digest, [PathGlobs(partition.elements)])
        snapshot = rule_runner.request(Snapshot, [digest])
        result = rule_runner.request(
            FmtResult,
            [
                OpenApiFormatRequest.Batch(
                    "",
                    partition.elements,
                    partition_metadata=partition.metadata,
                    snapshot=snapshot,
                )
            ],
        )
        results.append(result)
    return results