code: def atlas_peer_get_health( peer_hostport, peer_table=None ):
      
      with AtlasPeerTableLocked(peer_table) as ptbl:
          # availability score: number of responses / number of requests
          num_responses = 0
          num_requests = 0
          if ptbl.has_key(peer_hostport):
              for (t, r) in ptbl[peer_hostport]['time']:
                  num_requests += 1
                  if r:
                      num_responses += 1
  
          availability_score = 0.0
          if num_requests > 0:
              availability_score = float(num_responses) / float(num_requests)
  
      return availability_score
docs: Get the health score for a peer.
      Health is: (number of responses received / number of requests sent)