Group together as many records as possible to fit in the specified size

        Args:
            file (str): file path to read the records from.
            size (int): maximum size in MB that each group of records will be fitted to.
                passing 0 means unlimited size.

        Returns:
            generator of records

def pad(self, file, size=6):
        """Group together as many records as possible to fit in the specified size

        Args:
            file (str): file path to read the records from.
            size (int): maximum size in MB that each group of records will be fitted to.
                passing 0 means unlimited size.

        Returns:
            generator of records
        """
        buffer = ''
        for element in self.splitter.split(file):
            if _payload_size_within_limit(buffer + element, size):
                buffer += element
            else:
                tmp = buffer
                buffer = element
                yield tmp
        if _validate_payload_size(buffer, size):
            yield buffer