code: def unregister_switch_address(addr):
      
      ofp_handler = app_manager.lookup_service_brick(ofp_event.NAME)
      # Do nothing if ofp_handler is not started yet
      if ofp_handler.controller is None:
          return
      ofp_handler.controller.stop_client_loop(addr)
docs: Unregister the given switch address.
  
      Unregisters the given switch address to let
      ryu.controller.controller.OpenFlowController stop trying to initiate
      connection to switch.
  
      :param addr: A tuple of (host, port) pair of switch.