code: def search_with_retry(self, sleeptime=3.0, retrycount=3, **params):
          
          results = []
          count = 0
          while count < retrycount:
              try:
                  results = self.search(**params)
                  break
              except urllib2.URLError:
                  sys.stderr.write("Timeout while searching...Retrying\n")
                  time.sleep(sleeptime)
                  count += 1
          else:
              sys.stderr.write("Aborting search after %d attempts.\n" % (retrycount,))
          return results
docs: This function performs a search given a dictionary of search(..)
          parameters. It accounts for server timeouts as necessary and
          will retry some number of times.
  
          @param sleeptime: number of seconds to sleep between retries
          @type sleeptime: float
  
          @param retrycount: number of times to retry given search
          @type retrycount: int
  
          @param params: search parameters
          @type params: **kwds
  
          @rtype: list
          @return: returns records in given format