:type dpid: datapath id
    :param dpid:
    :rtype: ryu.controller.controller.Datapath
    :returns: datapath corresponding to dpid

def get_dp(app, dpid):
    """
    :type dpid: datapath id
    :param dpid:
    :rtype: ryu.controller.controller.Datapath
    :returns: datapath corresponding to dpid
    """
    switches = topo_api.get_switch(app, dpid)
    if not switches:
        return None
    assert len(switches) == 1
    return switches[0].dp