code: def encode_params_utf8(params):
      
      encoded = []
      for k, v in params:
          encoded.append((
              k.encode('utf-8') if isinstance(k, unicode_type) else k,
              v.encode('utf-8') if isinstance(v, unicode_type) else v))
      return encoded
docs: Ensures that all parameters in a list of 2-element tuples are encoded to
      bytestrings using UTF-8