def METHOD_NAME(receivers, name):
    assert receivers
    assert name
    for r in receivers:
        if name in r.name.lower() or (r.serial is not None and name == r.serial.lower()):
            return r