code: def _get_user_agent(platform=None):
      
      if isinstance(platform, ustr):
          platform = platform.upper()
      return {"chrome": AGENT_CHROME, "edge": AGENT_EDGE, "ios": AGENT_IOS}.get(
          platform, random.choice(AGENT_ALL)
      )
docs: Convenience function that looks up a user agent string, random if N/A