code: def collect(self):
          
          # The order of the frame order appends is based on the implementation
          # of reduce which calls our function with
          # f(valueToBeAdded, accumulator) so we do our reduce implementation.
          def append_frames(frame_a, frame_b):
              return frame_a.append(frame_b)
          return self._custom_rdd_reduce(append_frames)
docs: Collect the elements in an PRDD and concatenate the partition.