Python Document Text Detection OCR with spaces

I have the code off of google cloud and I am having trouble editing this to get the spaces out of images with the text.

def detect_document(path):
            """Detects document features in an image."""
            client = vision.ImageAnnotatorClient()

            with, 'rb') as image_file:
                content =

            image = types.Image(content=content)

            response = client.document_text_detection(image=image)
            document = response.full_text_annotation

            for page in document.pages:
                for block in page.blocks:
                    block_words = []
                    for paragraph in block.paragraphs:

                    block_symbols = []
                    for word in block_words:

                    block_text = ''
                    for symbol in block_symbols:
                        block_text = block_text + symbol.text

                    print('Block Content: {}'.format(block_text))