code: def stop_capture(self, adapter_number, port_number):
          
  
          try:
              adapter = self._adapters[adapter_number]
          except IndexError:
              raise IOUError('Adapter {adapter_number} does not exist on IOU "{name}"'.format(name=self._name,
                                                                                              adapter_number=adapter_number))
  
          if not adapter.port_exists(port_number):
              raise IOUError("Port {port_number} does not exist in adapter {adapter}".format(adapter=adapter,
                                                                                             port_number=port_number))
  
          nio = adapter.get_nio(port_number)
          if not nio:
              raise IOUError("NIO {port_number} does not exist in adapter {adapter}".format(adapter=adapter,
                                                                                            port_number=port_number))
  
          nio.stopPacketCapture()
          log.info('IOU "{name}" [{id}]: stopping packet capture on {adapter_number}/{port_number}'.format(name=self._name,
                                                                                                           id=self._id,
                                                                                                           adapter_number=adapter_number,
                                                                                                           port_number=port_number))
          if self.ubridge:
              bridge_name = "IOL-BRIDGE-{}".format(self.application_id + 512)
              yield from self._ubridge_send('iol_bridge stop_capture {name} {bay} {unit}'.format(name=bridge_name,
                                                                                                 bay=adapter_number,
                                                                                                 unit=port_number))
docs: Stops a packet capture.
  
          :param adapter_number: adapter number
          :param port_number: port number