def find_pin_by_name(self, name):
    for pin in self.pins:
        if (pin.name == name):
            return pin
def find_pin_by_name(self, name):
    for pin in self.pins:
        if (pin.name == name):
            return pin