code: def generate_user_agent(os=None, navigator=None, platform=None,
                          device_type=None):
      
      return generate_navigator(os=os, navigator=navigator,
                                platform=platform,
                                device_type=device_type)['user_agent']
docs: Generates HTTP User-Agent header
  
      :param os: limit list of os for generation
      :type os: string or list/tuple or None
      :param navigator: limit list of browser engines for generation
      :type navigator: string or list/tuple or None
      :param device_type: limit possible oses by device type
      :type device_type: list/tuple or None, possible values:
          "desktop", "smartphone", "tablet", "all"
      :return: User-Agent string
      :rtype: string
      :raises InvalidOption: if could not generate user-agent for
          any combination of allowed oses and navigators
      :raise InvalidOption: if any of passed options is invalid