code: def get_take(self, max_take):
          
          if self.take == None:
              return max_take
          if self.take < 0:
              return 0
          if self.take > max_take:
              return max_take
          return self.take
docs: Gets the number of items to return in a page.
  
          :param max_take: the maximum number of items to return.
  
          :return: the number of items to return.