<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_port_settings(self, port_number, settings):
 """ Applies port settings to a specific port. :param port_number: port number to set the settings :param settings: port settings """


        if settings["type"] == "access":
            yield from self.set_access_port(port_number, settings["vlan"])
        elif settings["type"] == "dot1q":
            yield from self.set_dot1q_port(port_number, settings["vlan"])
        elif settings["type"] == "qinq":
            yield from self.set_qinq_port(port_number, settings["vlan"], settings.get("ethertype"))