in amazon_transcribe/utils.py [0:0]
def _add_required_headers(endpoint: str, headers: Dict[str, str]):
urlparts = urlsplit(endpoint)
if not urlparts.hostname:
raise ValidationException(
"Unexpected endpoint ({endpoint}) provided to serializer"
)
headers.update(
{
"user-agent": f"transcribe-streaming-sdk-{version}",
"host": urlparts.hostname,
}
)