<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def port(self, name):
 """ Locate a port by name. @param name: A port name. @type name: str @return: The port object. @rtype: L{Port} """

        for p in self.ports:
            if p.name == name:
                return p