code: def _rational(self, val):
          
  
          I32 = 4294967296 # Maximum 32 bit unsigned int (i.e. 'I') value
          if isinstance(val, int):
               numer, denom = val, 1
          elif isinstance(val, fractions.Fraction):
              numer, denom = val.numerator, val.denominator
          elif hasattr(val, 'numer'):
              (numer, denom) = (int(val.numer()), int(val.denom()))
          else:
              param.main.param.warning("Casting type '%s' to Fraction.fraction"
                                 % type(val).__name__)
              frac = fractions.Fraction(str(val))
              numer, denom = frac.numerator, frac.denominator
          return numer % I32, denom % I32
docs: Convert the given value to a rational, if necessary.