code: 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
docs: :type dpid: datapath id
      :param dpid:
      :rtype: ryu.controller.controller.Datapath
      :returns: datapath corresponding to dpid