def METHOD_NAME(circuit, state, is_state_batched, rng=None) -> Result:
    """
    Perform the measurements required by the circuit on the provided state.
    This is an internal function that will be called by the successor to ``default.qubit``.
    Args:
        circuit (.QuantumScript): The single circuit to simulate
        state (TensorLike): The state to perform measurement on
        is_state_batched (bool): Whether the state has a batch dimension or not.
        rng (Union[None, int, array_like[int], SeedSequence, BitGenerator, Generator]): A
            seed-like parameter matching that of ``seed`` for ``numpy.random.default_rng``.
            If no value is provided, a default RNG will be used.
    Returns:
        Tuple[TensorLike]: The measurement results
    """
    if set(circuit.wires) != set(range(circuit.num_wires)):
        wire_map = {w: i for i, w in enumerate(circuit.wires)}
        circuit = qml.map_wires(circuit, wire_map)
    if not circuit.shots:
        # analytic case
        if len(circuit.measurements) == 1:
            return measure(circuit.measurements[0], state, is_state_batched=is_state_batched)
        return tuple(
            measure(mp, state, is_state_batched=is_state_batched) for mp in circuit.measurements
        )
    # finite-shot case
    rng = default_rng(rng)
    results = measure_with_samples(
        circuit.measurements, state, shots=circuit.shots, is_state_batched=is_state_batched, rng=rng
    )
    if len(circuit.measurements) == 1:
        if circuit.shots.has_partitioned_shots:
            return tuple(res[0] for res in results)
        return results[0]
    return results