def toint(number):
 if isinstance(number, float):
  if (number > 1):
   number = round(number, 0)
  else:
   number = round(math.ceil(number), 0)
 return int(number)

def toint ( number ) : if isinstance ( number , float ) : if ( number > 1 ) : number = round ( number , 0 ) else : number = round ( math . ceil ( number ) , 0 ) return int ( number )
helper to return rounded int for a float or just the int it self .