def get_dp(app, dpid):
    switches = topo_api.get_switch(app, dpid)
    if not switches:
        return None
    assert len(switches) == 1
    return switches[0].dp
:type dpid: datapath id
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/vrrp/utils.py/get_dp