def _make_blocks(records):
    """
        Organizes the physical records into blocks in a list by
        placing consecutive physical records into a single block, so
        lesser VXRs will be created.
          [[start_rec1,end_rec1,data_1], [start_rec2,enc_rec2,data_2], ...]

        Parameters:
            records: list
                A list of records that there is data for

        Returns:
            sparse_blocks: list of list
                A list of ranges we have physical values for.

        Example:
            Input: [1,2,3,4,10,11,12,13,50,51,52,53]
            Output: [[1,4],[10,13],[50,53]]
        """
    sparse_blocks = []
    total = len(records)
    if total == 0:
        return []
    x = 0
    while x < total:
        recstart = records[x]
        y = x
        recnum = recstart
        while y + 1 < total:
            y = y + 1
            nextnum = records[y]
            diff = nextnum - recnum
            if diff == 1:
                recnum = nextnum
            else:
                y = y - 1
                break
        ablock = []
        ablock.append(recstart)
        if y + 1 == total:
            recend = records[total - 1]
        else:
            recend = records[y]
        x = y + 1
        ablock.append(recend)
        sparse_blocks.append(ablock)
    return sparse_blocks
