Extract packet from buffer

def extract_packet(self):
        """
        Extract packet from buffer
        """
        packet_size = velbus.MINIMUM_MESSAGE_SIZE + \
            (self.buffer[3] & 0x0F)
        packet = self.buffer[0:packet_size]
        return packet