in src/pre_human_task_lambda.py [0:0]
def analyze_document(byte_array):
"""Call Textract's detect_document_text method and return the payload."""
textract_client = boto3.client('textract')
response = textract_client.detect_document_text(
Document={
'Bytes': byte_array
}
)
return response