'Returns the index which is preferred to keep in the final expression.
The preferred index is the index with more information regarding fermi
level.  If indices contain same information, index 0 is returned.'

def _get_preferred_index(self):

    if (not self.is_above_fermi):
        if self.args[0].assumptions0.get('below_fermi'):
            return 0
        else:
            return 1
    elif (not self.is_below_fermi):
        if self.args[0].assumptions0.get('above_fermi'):
            return 0
        else:
            return 1
    else:
        return 0
