in callouts/python/extproc/example/normalize_header/service_callout_example.py [0:0]
def get_device_type(host_value: str) -> str:
"""Determine device type based on user agent."""
if 'm.example.com' in host_value:
return 'mobile'
elif 't.example.com' in host_value:
return 'tablet'
return 'desktop'