code: def bind_socket(address, port):
      
  
      assert address
      assert port
      bindsocket = socket.socket()
      try:
          bindsocket.bind((address, port))
      except socket.error:
          logger.error("Couldn't bind socket on %s:%s", address, port)
          return None
  
      logger.info('Listening on %s:%s', address, port)
      bindsocket.listen(0)
      return bindsocket
docs: Returns a socket bound on (address:port).