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.

def get_take(self, max_take):
        """
        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.
        """
        if self.take == None:
            return max_take
        if self.take < 0:
            return 0
        if self.take > max_take:
            return max_take
        return self.take