For the following sample:
def fuctionName(int, bool): if int in range(...): if bool == True: return False else: r
You can just use:
return not bool