code: def _append_params(oauth_params, params):
      
      merged = list(params)
      merged.extend(oauth_params)
      # The request URI / entity-body MAY include other request-specific
      # parameters, in which case, the protocol parameters SHOULD be appended
      # following the request-specific parameters, properly separated by an "&"
      # character (ASCII code 38)
      merged.sort(key=lambda i: i[0].startswith('oauth_'))
      return merged
docs: Append OAuth params to an existing set of parameters.
  
      Both params and oauth_params is must be lists of 2-tuples.
  
      Per `section 3.5.2`_ and `3.5.3`_ of the spec.
  
      .. _`section 3.5.2`: https://tools.ietf.org/html/rfc5849#section-3.5.2
      .. _`3.5.3`: https://tools.ietf.org/html/rfc5849#section-3.5.3