<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_dut_configuration(self, ident, config):
 """ Set requirements for dut ident. :param ident: Identity of dut. :param config: If ResourceRequirements object, add object as requirements for resource ident. If dictionary, create new ResourceRequirements object from dictionary. :return: Nothing """

        if hasattr(config, "get_requirements"):
            self._dut_requirements[ident] = config
        elif isinstance(config, dict):
            self._dut_requirements[ident] = ResourceRequirements(config)