def METHOD_NAME(business, addresses_id=None, address_type=None):
    # find by ID
    addresses = None
    if addresses_id:
        rv = db.session.query(Business, Address). \
            filter(Business.id == Address.business_id).\
            filter(Business.identifier == business.identifier).\
            filter(Address.id == addresses_id).\
            one_or_none()
        if rv:
            _address_type = Address.JSON_MAILING \
                if rv[1].address_type == Address.MAILING else Address.JSON_DELIVERY
            addresses = {_address_type: rv[1].json}
    # find by address type
    if address_type:
        if address_type.lower() == Address.JSON_MAILING.lower():
            _address_type = Address.JSON_MAILING
            address = business.mailing_address.one_or_none()
        else:
            _address_type = Address.JSON_DELIVERY
            address = business.delivery_address.one_or_none()
        if address:
            addresses = {_address_type: address.json}
    if not addresses:
        return None, {'message': f'{business.identifier} address not found'}, HTTPStatus.NOT_FOUND
    return addresses, None, HTTPStatus.OK