code: def stop_proxy(self):
          
  
          self.runner.info_log("Stopping proxy...")
  
          if hasattr(self, 'proxy_pid'):
              try:
                  kill_by_pid(self.proxy_pid)
              except psutil.NoSuchProcess:
                  pass
docs: Stop the mitmproxy