class_docstr: This class implements rational numbers.
  
  In the two-argument form of the constructor, Fraction(8, 6) will
  produce a rational number equivalent to 4/3. Both arguments must
  be Rational. The numerator defaults to 0 and the denominator
  defaults to 1 so that Fraction(3) == 3 and Fraction() == 0.
  
  Fractions can also be constructed from:
  
    - numeric strings similar to those accepted by the
      float constructor (for example, '-2.3' or '1e10')
  
    - strings of the form '123/456'
  
    - float and Decimal instances
  
    - other Rational instances (including integers)
class_docstr_tok: ["This","class","implements","rational","numbers",".","In","the","two-argument","form","of","the","constructor",",","Fraction","(","8",",","6",")","will","produce","a","rational","number","equivalent","to","4\/3",".","Both","arguments","must","be","Rational",".","The","numerator","defaults","to","0","and","the","denominator","defaults","to","1","so","that","Fraction","(","3",")","==","3","and","Fraction","(",")","==","0",".","Fractions","can","also","be","constructed","from",":","-","numeric","strings","similar","to","those","accepted","by","the","float","constructor","(","for","example",",","'-2.3","'","or","'1e10","'",")","-","strings","of","the","form","'123\/456'","-","float","and","Decimal","instances","-","other","Rational","instances","(","including","integers",")"]
docstr: round(self, ndigits)
  
  Rounds half toward even.
code: def __round__(self, ndigits=None):
      """round(self, ndigits)
  
      Rounds half toward even.
      """
      if ndigits is None:
          d = self._denominator
          floor, remainder = divmod(self._numerator, d)
          if remainder * 2 < d:
              return floor
          elif remainder * 2 > d:
              return floor + 1
          # Deal with the half case:
          elif floor % 2 == 0:
              return floor
          else:
              return floor + 1
      shift = 10 ** abs(ndigits)
      # See _operator_fallbacks.forward to check that the results of
      # these operations will always be Fraction and therefore have
      # round().
      if ndigits > 0:
          return Fraction(round(self * shift), shift)
      else:
          return Fraction(round(self / shift) * shift)
  
imports: from decimal import Decimal
  import functools
  import math
  import numbers
  import operator
  import re
  import sys
label_desc: Use image node_id 32 for calling the Fraction obj's underlying member method code with example usage: obj.__round__(ndigits) and returns: Fraction, Fraction, floor, unknown, floor, unknown