I was basing that off of this function https://github.com/newportt/httpagentparser/blob/132f0442865686512628861191e296ab86a6ba31/httpagentparser/__init__.py#L275