code: def attend_fight(self, mappings, node_ip, predictions, ntp):
          
  
          # Bind listen server socket.
          mappings = self.add_listen_sock(mappings)
          log.debug(mappings)
  
          # Walk to fight.
          self.simultaneous_cons = []
          predictions = predictions.split(" ")
          self.simultaneous_fight(mappings, node_ip, predictions, ntp)
  
          # Return hole made in opponent.
          if len(self.simultaneous_cons):
              """
              There may be a problem here. I noticed that when these lines
              were removed during testing that connections tended to
              succeed more. There may be a lack of synchronization between
              the timing for connections to succeed so that a close on
              one side of the fight ends up ruining valid connections on
              this side. Will need to test more.
  
              Notes: the UNL synchronization code could actually fix
              this (potential) problem as a cool unintended side-effect.
              """
  
              # Close unneeded holes.
              """
              for i in range(1, len(self.simultaneous_cons)):
                  try:
                      print("Closing unneeded hole")
                      #self.simultaneous_cons[i].s.close()
                  except:
                      pass
              """
  
              try:
                  # Return open hole.
                  return self.simultaneous_cons[0]
              except:
                  # Try accept a connection.
                  log.debug("No holes found")
                  for mapping in mappings:
                      # Check if there's a new con.
                      s = mapping["listen"]
                      r, w, e = select.select(
                          [s],
                          [],
                          [],
                          0
                      )
  
                      # Find socket.
                      for found_sock in r:
                          # Not us.
                          if found_sock != s:
                              continue
  
                          # Accept a new con from the listen queue.
                          log.debug("Accept logic works!")
                          client, address = s.accept()
                          con = Sock(blocking=0)
                          con.set_sock(client)
                          return con
  
          return None
docs: This function is for starting and managing a fight
          once the details are known. It also handles the
          task of returning any valid connections (if any) that
          may be returned from threads in the simultaneous_fight function.