class_docstr: The discrete, or Kronecker, delta function.
  
  Explanation
  ===========
  
  A function that takes in two integers $i$ and $j$. It returns $0$ if $i$
  and $j$ are not equal, or it returns $1$ if $i$ and $j$ are equal.
  
  Examples
  ========
  
  An example with integer indices:
  
      >>> from sympy import KroneckerDelta
      >>> KroneckerDelta(1, 2)
      0
      >>> KroneckerDelta(3, 3)
      1
  
  Symbolic indices:
  
      >>> from sympy.abc import i, j, k
      >>> KroneckerDelta(i, j)
      KroneckerDelta(i, j)
      >>> KroneckerDelta(i, i)
      1
      >>> KroneckerDelta(i, i + 1)
      0
      >>> KroneckerDelta(i, i + 1 + k)
      KroneckerDelta(i, i + k + 1)
  
  Parameters
  ==========
  
  i : Number, Symbol
      The first index of the delta function.
  j : Number, Symbol
      The second index of the delta function.
  
  See Also
  ========
  
  eval
  DiracDelta
  
  References
  ==========
  
  .. [1] https://en.wikipedia.org/wiki/Kronecker_delta
class_docstr_tok: ["The","discrete",",","or","Kronecker",",","delta","function",".","Explanation","===========","A","function","that","takes","in","two","integers","$","i","$","and","$","j","$",".","It","returns","$","0","$","if","$","i","$","and","$","j","$","are","not","equal",",","or","it","returns","$","1","$","if","$","i","$","and","$","j","$","are","equal",".","Examples","========","An","example","with","integer","indices",":",">",">",">","from","sympy","import","KroneckerDelta",">",">",">","KroneckerDelta","(","1",",","2",")","0",">",">",">","KroneckerDelta","(","3",",","3",")","1","Symbolic","indices",":",">",">",">","from","sympy.abc","import","i",",","j",",","k",">",">",">","KroneckerDelta","(","i",",","j",")","KroneckerDelta","(","i",",","j",")",">",">",">","KroneckerDelta","(","i",",","i",")","1",">",">",">","KroneckerDelta","(","i",",","i","+","1",")","0",">",">",">","KroneckerDelta","(","i",",","i","+","1","+","k",")","KroneckerDelta","(","i",",","i","+","k","+","1",")","Parameters","==========","i",":","Number",",","Symbol","The","first","index","of","the","delta","function",".","j",":","Number",",","Symbol","The","second","index","of","the","delta","function",".","See","Also","========","eval","DiracDelta","References","==========","..","[","1","]","https",":","\/\/en.wikipedia.org\/wiki\/Kronecker_delta"]
docstr: 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 the same information, index 0 is returned.
docstr_tok: ["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","the","same","information",",","index","0","is","returned","."]
code: def _get_preferred_index(self):
      """
      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 the same information, index 0 is returned.
  
      """
      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
  
imports: from math import prod
  from sympy.core import S, Integer
  from sympy.core.function import Function
  from sympy.core.logic import fuzzy_not
  from sympy.core.relational import Ne
  from sympy.core.sorting import default_sort_key
  from sympy.external.gmpy import SYMPY_INTS
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.functions.elementary.piecewise import Piecewise
  from sympy.utilities.iterables import has_dups
label_desc: Use image node_id 11 for calling the KroneckerDelta obj's underlying member method code with example usage: obj._get_preferred_index() and returns: int, int, int, int, int