def get_signatured_headers(headers):
 d = {}
 msg = ''
 for (k, v) in headers:
  d[k] = v
  msg += (k + v)
 secret = os.environ.get('SECRET_KEY', '')
 d['Signature'] = get_signature(secret, msg)
 return d

def get_signatured_headers ( headers ) : d = { } msg = '' for ( k , v ) in headers : d [ k ] = v msg += ( k + v ) secret = os . environ . get ( 'SECRET_KEY' , '' ) d [ 'Signature' ] = get_signature ( secret , msg ) return d
given a list of headers .