function validate(data, scope) {
    let invalids = [];

    // Check for duplicate identifiers
    if (!checkDistinctIdentifiersData(data)) {
        invalids.push({
            type: VALIDATION_ERRORS.DUPLICATE_ID_DATA,
            identifier: '-',
            message: 'Duplicate identifiers in test data',
        });
    }

    if (!checkDistinctIdentifiersScope(scope)) {
        invalids.push({
            type: VALIDATION_ERRORS.DUPLICATE_ID_SCOPE,
            identifier: '-',
            message: 'Duplicate identifiers in circuit',
        });
    }

    // Don't do further checks if duplicates
    if (invalids.length > 0) return { ok: false, invalids };

    // Validate inputs and outputs
    const inputsValid = validateInputs(data, scope);
    const outputsValid = validateOutputs(data, scope);

    invalids = inputsValid.ok ? invalids : invalids.concat(inputsValid.invalids);
    invalids = outputsValid.ok ? invalids : invalids.concat(outputsValid.invalids);

    // Validate presence of reset if test is sequential
    if (data.type === 'seq') {
        const resetPresent = scope.Input.some((simulatorReset) => (
            simulatorReset.label === 'RST'
                && simulatorReset.bitWidth === 1
                && simulatorReset.objectType === 'Input'
        ));

        if (!resetPresent) {
            invalids.push({
                type: VALIDATION_ERRORS.NO_RST,
                identifier: 'RST',
                message: 'Reset(RST) not present in circuit',
            });
        }
    }

    if (invalids.length > 0) return { ok: false, invalids };
    return { ok: true };
}
Validate if all inputs and output elements are present with correct bitwidths
@param {Object} data - Object containing Test Data
@param {Scope} scope - the circuit