code: def append_user_agent(self, user_agent):
          
          old_ua = self.session.headers.get('User-Agent', '')
          ua = old_ua + ' ' + user_agent
          self.session.headers['User-Agent'] = ua.strip()
docs: Append text to the User-Agent header for the request.
  
          Use this method to update the User-Agent header by appending the
          given string to the session's User-Agent header separated by a space.
  
          :param user_agent: A string to append to the User-Agent header
          :type user_agent: str