parameters: (self, seg_num, unbridged_graph)
return_statement: return depth_fraction_used - (penalty / 2.0)
docstring: Returns a score for the segment which reflects how likely it is that the segment has been
          'used up' in bridges. E.g. a segment which originally had a depth of 2.0 and now has a
          depth of 0.03 is probably used up, but if its depth is now 0.94, it's less likely that
          it's used up.
docstring_summary: Returns a score for the segment which reflects how likely it is that the segment has been
          'used up' in bridges. E.g. a segment which originally had a depth of 2.0 and now has a
          depth of 0.03 is probably used up, but if its depth is now 0.94, it's less likely that
          it's used up.
docstring_tokens: Returns a score for the segment which reflects how likely it is that the segment has been used up in bridges . E . g . a segment which originally had a depth of 2 . 0 and now has a depth of 0 . 03 is probably used up but if its depth is now 0 . 94 it s less likely that it s used up .
function: def get_usedupness_score(self, seg_num, unbridged_graph):
          """
          Returns a score for the segment which reflects how likely it is that the segment has been
          'used up' in bridges. E.g. a segment which originally had a depth of 2.0 and now has a
          depth of 0.03 is probably used up, but if its depth is now 0.94, it's less likely that
          it's used up.
          """
          original_depth = unbridged_graph.segments[seg_num].depth
          current_depth = self.segments[seg_num].depth
          depth_used = original_depth - current_depth
  
          # Since segment depths can get negative, depth_fraction_used can exceed 1.0.
          depth_fraction_used = depth_used / original_depth
  
          # A score penalty is applied based on the original depth. For example, a segment that
          # originally had 20x depth and is now down to 2x is less confidently used up than a segment
          # which originally had 2x depth and is now down to 0.2x.
          penalty = score_function(original_depth, 4.0)
  
          return depth_fraction_used - (penalty / 2.0)
function_tokens: def get_usedupness_score ( self , seg_num , unbridged_graph ) : original_depth = unbridged_graph . segments [ seg_num ] . depth current_depth = self . segments [ seg_num ] . depth depth_used = original_depth - current_depth # Since segment depths can get negative, depth_fraction_used can exceed 1.0. depth_fraction_used = depth_used / original_depth # A score penalty is applied based on the original depth. For example, a segment that # originally had 20x depth and is now down to 2x is less confidently used up than a segment # which originally had 2x depth and is now down to 0.2x. penalty = score_function ( original_depth , 4.0 ) return depth_fraction_used - ( penalty / 2.0 )