original_docstring: 
      Calculate the entropy of two slices (from the start and end of an axis),
      returning a tuple containing the amount that should be added to the start
      and removed from the end of the axis.
      
docstring: Calculate the entropy of two slices (from the start and end of an axis),
  returning a tuple containing the amount that should be added to the start
  and removed from the end of the axis.
docstring_tokens: Calculate the entropy of two slices ( from the start and end of an axis ) returning a tuple containing the amount that should be added to the start and removed from the end of the axis .
code: def _compare_entropy(start_slice, end_slice, slice, difference):
      """
      Calculate the entropy of two slices (from the start and end of an axis),
      returning a tuple containing the amount that should be added to the start
      and removed from the end of the axis.
      """
      start_entropy = image_entropy(start_slice)
      end_entropy = image_entropy(end_slice)
      if end_entropy and abs(start_entropy / end_entropy - 1) < 0.01:
          # Less than 1% difference, remove from both sides.
          if difference >= slice * 2:
              return slice, slice
          half_slice = slice // 2
          return half_slice, slice - half_slice
      if start_entropy > end_entropy:
          return 0, slice
      else:
          return slice, 0
code_tokens: def _compare_entropy ( start_slice , end_slice , slice , difference ) : start_entropy = image_entropy ( start_slice ) end_entropy = image_entropy ( end_slice ) if end_entropy and abs ( start_entropy / end_entropy - 1 ) < 0.01 : if difference >= slice * 2 : return slice , slice half_slice = slice // 2 return half_slice , slice - half_slice if start_entropy > end_entropy : return 0 , slice else : return slice , 0
short_docstring: Calculate the entropy of two slices (from the start and end of an axis),
  returning a tuple containing the amount that should be added to the start
  and removed from the end of the axis.
short_docstring_tokens: Calculate the entropy of two slices ( from the start and end of an axis ) returning a tuple containing the amount that should be added to the start and removed from the end of the axis .
comment: """
      Calculate the entropy of two slices (from the start and end of an axis),
      returning a tuple containing the amount that should be added to the start
      and removed from the end of the axis.
      """$SEP$# Less than 1% difference, remove from both sides.