<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __generate_indexed_requirements(dut_count, basekeys, requirements):
 """ Generate indexed requirements from general requirements. :param dut_count: Amount of duts :param basekeys: base keys as dict :param requirements: requirements :return: Indexed requirements as dict. """

        dut_requirements = []
        for i in range(1, dut_count + 1):
            dut_requirement = ResourceRequirements(basekeys.copy())
            if i in requirements["duts"]:
                for k in requirements["duts"][i]:
                    dut_requirement.set(k, requirements["duts"][i][k])
            elif str(i) in requirements["duts"]:
                i = str(i)
                for k in requirements["duts"][i]:
                    dut_requirement.set(k, requirements["duts"][i][k])
            dut_requirements.append(dut_requirement)
        return dut_requirements