def find_pin(self, port, pbit):
    for pin in self.pins:
        if ((pin.port == port) and (pin.pbit == pbit)):
            return pin
def find_pin(self, port, pbit):
    for pin in self.pins:
        if ((pin.port == port) and (pin.pbit == pbit)):
            return pin